Exporting multitables from EViews to Spreadsheet
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Exporting multitables from EViews to Spreadsheet
Hello,
My workfile contains 12 pages, each page has a result table (called table1). As each workfile contains 12 pages, so it has 12 tables(results). Now I need to export these 12 tables(results) from each page into a speadsheet, I would be very grateful if you could help me with some codes, so I can run it in order to export 12 tables(results) from different pages to an excel sheet in one go.
Thank you very much for your reply.
Jian
My workfile contains 12 pages, each page has a result table (called table1). As each workfile contains 12 pages, so it has 12 tables(results). Now I need to export these 12 tables(results) from each page into a speadsheet, I would be very grateful if you could help me with some codes, so I can run it in order to export 12 tables(results) from different pages to an excel sheet in one go.
Thank you very much for your reply.
Jian
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Exporting multitables from EViews to Spreadsheet
Use the copy command to copy the tables into the same page, then create a spool (using the spool command), add the tables to the spool (spool.append), then finally save the spool to disk as a csv file (spool.save).
Re: Exporting multitables from EViews to Spreadsheet
Many thanks Gareth. I will try it.
Re: Exporting multitables from EViews to Spreadsheet
Dear Gareth
According to your advice, I've tried to copy all the tables from different pages into sheet2. I use copy command, but it doesn't work, error message shows - "bad object specification". I' m not sure where I've got wrong, my code is below:
wfopen C:\Users\HUBS\Desktop\cocoa_nd.wf1
'I need to copy all the tables from different pages into sheet2. I use the copy command, but it doesn't work, error message shows - bad object specification
copy src_sheet3\src_table2 dest_sheet2\
copy src_sheet4\src_table3 dest_sheet2\
....
copy src_sheet12\src_table12 dest_sheet2\
Many thanks for your help in advance.
Kind regards,
Jian
According to your advice, I've tried to copy all the tables from different pages into sheet2. I use copy command, but it doesn't work, error message shows - "bad object specification". I' m not sure where I've got wrong, my code is below:
wfopen C:\Users\HUBS\Desktop\cocoa_nd.wf1
'I need to copy all the tables from different pages into sheet2. I use the copy command, but it doesn't work, error message shows - bad object specification
copy src_sheet3\src_table2 dest_sheet2\
copy src_sheet4\src_table3 dest_sheet2\
....
copy src_sheet12\src_table12 dest_sheet2\
Many thanks for your help in advance.
Kind regards,
Jian
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Exporting multitables from EViews to Spreadsheet
You need to give it a name on the destination sheet.
Re: Exporting multitables from EViews to Spreadsheet
I'm really sorry as a beginner in programming, I'm not sure what you meant. Could you give a specific example or change my code below to show me. Many thanks.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Exporting multitables from EViews to Spreadsheet
Code: Select all
copy src_sheet3\src_table2 dest_sheet2\src_table2Re: Exporting multitables from EViews to Spreadsheet
After I run your code (copy src_sheet3\src_table2 dest_sheet2\src_table2), I still got the error message, ie, " Bad object specification src_sheet3\src_table2 in "COPY src_sheet3\src_table2 dest_sheet2\src_table2". I don't know why, would appreciate your advice.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Exporting multitables from EViews to Spreadsheet
Hard to say, it looks ok.
Re: Exporting multitables from EViews to Spreadsheet
Hello
I want to collect all the tables from different pages to one page, but the code (copy src_sheet3\src_table2 dest_sheet2\src_table2) couldn't work. To find the reason, I now try copying a table within the same page using the following code:
Copy src_table1 dest_table2 But again an error message appears - "src_table1 is not defined". My question: How to define src_table1 (table1 is already in the page)?
Many thanks for your help.
Jian
I want to collect all the tables from different pages to one page, but the code (copy src_sheet3\src_table2 dest_sheet2\src_table2) couldn't work. To find the reason, I now try copying a table within the same page using the following code:
Copy src_table1 dest_table2 But again an error message appears - "src_table1 is not defined". My question: How to define src_table1 (table1 is already in the page)?
Many thanks for your help.
Jian
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Exporting multitables from EViews to Spreadsheet
Code: Select all
wfcreate(page=page_a) u 10
table taba
pagecreate(page=page_b) u 10
table tabb
pagecreate(page=page_c) u 10
table tabc
pagecreate(page=page_d) u 10
copy page_a\taba page_d\taba
copy page_b\tabb page_d\tabb
copy page_c\tabc page_d\tabc
Re: Exporting multitables from EViews to Spreadsheet
Many thanks Gareth.
Who is online
Users browsing this forum: No registered users and 2 guests
