Posts: 4
Threads: 1
Joined: Aug 2008
Reputation:
0
08-26-2008, 02:33 PM
Hi ,
i am facing an issue in saving to an common xls from diff scripts running from diff machines populating different columns & rows.
The data which persist is from the last run script( Previous script data is lost).Methods used are datatable.import and export.
Pls let me know how can i persist the old data even.
Thanks.
Posts: 4
Threads: 1
Joined: Aug 2008
Reputation:
0
08-26-2008, 03:46 PM
Can anybody help out with this please?
Posts: 159
Threads: 1
Joined: Apr 2008
Reputation:
0
08-26-2008, 05:55 PM
Dear Pradeep,
Are you exporting global and local sheet ?
Can you post your import or export code here...
If you are exporting Global and Local then it is going to update..
I can help you if you post your code here.
Posts: 4
Threads: 1
Joined: Aug 2008
Reputation:
0
08-26-2008, 06:28 PM
thanks Sridhar, its a global sheet i will be exporting code is usval one
datatable.Import("C:\Test_Data.xls")
* some cals here
datatable.Value("Test_PL_value")=Plval
datatable.export("C:\Test_Data.xls")
but this code is also run in another machine ( diff environment) and update the same datatable. The result i am seeing is the latest update but what i need is both saves done on diff environments (offcourse to diff columns).
-Pradeep
Posts: 159
Threads: 1
Joined: Apr 2008
Reputation:
0
08-27-2008, 03:26 AM
Dear Pradeep,
Export method exports both global and local sheet.
clear me one thing .Where is the output is it in Global sheet or Local sheet.
If it is in only either local ot global sheet then you use the Import or Export sheet method then it is going to workout for you..
Posts: 4
Threads: 1
Joined: Aug 2008
Reputation:
0
08-27-2008, 10:35 AM
Hi Sridhar,
Its in the Global sheet.
The whole process is
1.2 scripts picks up(import) the xls file
2.Updates it
3.stores it at the different time(exports to the same loc and same file name).
the script which stores the datatable at the later time is actually replacing the old xls file . This is the pronblem .
what i need is something wherein the xls gets updated with preserving the existing data in it.
The approach i think is to read the xls first before saving any update and write to it with pervious data (which is read) with the new data.
pls suggest as i feel this is bit complicated approach.
Thanks,
Pradeep