Re: [web2py] Exporting html table as csv

2022-03-31 Thread Dave S


On Wednesday, March 30, 2022 at 8:37:29 AM UTC-7 mostwanted wrote:

> Its a permanent html table in the view with information from different 
> database tables. From there i wanna download it as CSV to be used in excel 
> reports.
>

"Permanent html table" does make sense to me.  Permanent means it is kept 
in storage and not created during page rendering.

I find I can often use cut-and-paste to transfer something from a web page 
to a spreadsheet, but this may be awkward for large tables, and maybe not 
something you want to do everyday, much less once an hour.  On the other 
hand, saving the rendered html on the client machine makes it easy to run a 
script there that parses out the table.  I have a python script I use 
frequently, but it is also something you could do in an emacs or vim 
macro.  People who keep their vbasic skills up can do it as an Excel macro.

If you're creating the html from rows selected by a join, then the example's

with open('test.csv', 'wb') as dumpfile: rows.export_to_csv_file(dumpfile)

still works, and then you can have a button to download test.csv.  If more 
than one person is going to be collecting those results, you might want to 
have a distinguishing name, either appending username to the basename, or 
using the session id.  
(refers back to 
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#CSV-one-Table-at-a-time->

/dps


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/53334a70-2929-4f4b-85a2-28584358dde4n%40googlegroups.com.


Re: [web2py] Exporting html table as csv

2022-03-30 Thread mostwanted
Its a permanent html table in the view with information from different 
database tables. From there i wanna download it as CSV to be used in excel 
reports.

On Wednesday, March 30, 2022 at 11:10:12 AM UTC+2 snide...@gmail.com wrote:

>
> On Saturday, March 26, 2022 at 2:24:06 AM UTC-7 mostwanted wrote:
>
>> Thanks alot Murat, gratitude
>>
>
> Was 
>  http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#CSV-one-Table-at-a-time-
> >
> of any help?  Are you creating a temporary table that you render the HTML 
> from?
>
>  
>
>>
>> On Friday, March 25, 2022 at 1:05:54 PM UTC+2 muratkas...@gmail.com 
>> wrote:
>>
>>> Hi,
>>>
>>> You can use the javascript on HTML file like this:
>>> https://yourblogcoach.com/export-html-table-to-csv-using-javascript/
>>>
>>> https://stackoverflow.com/questions/15547198/export-html-table-to-csv-using-vanilla-javascript
>>>
>>> If you want to read CSV and insert to db, you can check the codes in 
>>> appadmin.py file on admin app.
>>>
>>> Regards,
>>> Murat.
>>>
>>>
>>>
>>> mostwanted , 25 Mar 2022 Cum, 11:11 tarihinde şunu 
>>> yazdı:
>>>
 Is there a way to download data in my html table as csv? 

 I have information in an html table that comes from 4 different 
 database tables but i want to have it downloaded to be used further in 
 excel. Can i download this html table that i have combined all this 
 information in as a single csv file with all this information?

 Regards;

 /dps
>  
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/16f85205-ee5a-4702-945d-c0859c1743bbn%40googlegroups.com.


Re: [web2py] Exporting html table as csv

2022-03-30 Thread Dave S

On Saturday, March 26, 2022 at 2:24:06 AM UTC-7 mostwanted wrote:

> Thanks alot Murat, gratitude
>

Was 
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#CSV-one-Table-at-a-time->
of any help?  Are you creating a temporary table that you render the HTML 
from?

 

>
> On Friday, March 25, 2022 at 1:05:54 PM UTC+2 muratkas...@gmail.com wrote:
>
>> Hi,
>>
>> You can use the javascript on HTML file like this:
>> https://yourblogcoach.com/export-html-table-to-csv-using-javascript/
>>
>> https://stackoverflow.com/questions/15547198/export-html-table-to-csv-using-vanilla-javascript
>>
>> If you want to read CSV and insert to db, you can check the codes in 
>> appadmin.py file on admin app.
>>
>> Regards,
>> Murat.
>>
>>
>>
>> mostwanted , 25 Mar 2022 Cum, 11:11 tarihinde şunu 
>> yazdı:
>>
>>> Is there a way to download data in my html table as csv? 
>>>
>>> I have information in an html table that comes from 4 different database 
>>> tables but i want to have it downloaded to be used further in excel. Can i 
>>> download this html table that i have combined all this information in as a 
>>> single csv file with all this information?
>>>
>>> Regards;
>>>
>>> /dps
 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/c0132283-b965-4921-b1e5-acd6b3bf9acan%40googlegroups.com.


Re: [web2py] Exporting html table as csv

2022-03-26 Thread mostwanted
Thanks alot Murat, gratitude

On Friday, March 25, 2022 at 1:05:54 PM UTC+2 muratkas...@gmail.com wrote:

> Hi,
>
> You can use the javascript on HTML file like this:
> https://yourblogcoach.com/export-html-table-to-csv-using-javascript/
>
> https://stackoverflow.com/questions/15547198/export-html-table-to-csv-using-vanilla-javascript
>
> If you want to read CSV and insert to db, you can check the codes in 
> appadmin.py file on admin app.
>
> Regards,
> Murat.
>
>
>
> mostwanted , 25 Mar 2022 Cum, 11:11 tarihinde şunu 
> yazdı:
>
>> Is there a way to download data in my html table as csv? 
>>
>> I have information in an html table that comes from 4 different database 
>> tables but i want to have it downloaded to be used further in excel. Can i 
>> download this html table that i have combined all this information in as a 
>> single csv file with all this information?
>>
>> Regards;
>>
>> -- 
>> Resources:
>> - http://web2py.com
>> - http://web2py.com/book (Documentation)
>> - http://github.com/web2py/web2py (Source code)
>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/05b0e270-acc0-4856-a9af-bb2acdf9fe48n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/33af83ae-322f-422f-b0b8-8101f03fdc00n%40googlegroups.com.


Re: [web2py] Exporting html table as csv

2022-03-25 Thread Murat KAŞIKÇIOĞLU
Hi,

You can use the javascript on HTML file like this:
https://yourblogcoach.com/export-html-table-to-csv-using-javascript/
https://stackoverflow.com/questions/15547198/export-html-table-to-csv-using-vanilla-javascript

If you want to read CSV and insert to db, you can check the codes in
appadmin.py file on admin app.

Regards,
Murat.



mostwanted , 25 Mar 2022 Cum, 11:11 tarihinde şunu
yazdı:

> Is there a way to download data in my html table as csv?
>
> I have information in an html table that comes from 4 different database
> tables but i want to have it downloaded to be used further in excel. Can i
> download this html table that i have combined all this information in as a
> single csv file with all this information?
>
> Regards;
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/05b0e270-acc0-4856-a9af-bb2acdf9fe48n%40googlegroups.com
> 
> .
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAC5t_JwgYvTKwKfcom4Src%3D-0mPbig7Qm0J%3DoK65id9v_uvBfQ%40mail.gmail.com.


[web2py] Exporting html table as csv

2022-03-25 Thread mostwanted
Is there a way to download data in my html table as csv? 

I have information in an html table that comes from 4 different database 
tables but i want to have it downloaded to be used further in excel. Can i 
download this html table that i have combined all this information in as a 
single csv file with all this information?

Regards;

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/05b0e270-acc0-4856-a9af-bb2acdf9fe48n%40googlegroups.com.