Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Experts,
I want to save straight table in .csv format at location "C:\ChartData.csv", ", ". I'm using below script but only getting msg "macro running" at bottom left corner and also my application is getting hang-
sub abc
set sObject = ActiveDocument.GetSheetObject("CH26")
sObject.Export "C:\ChartData.csv", ", "
end sub
Please let me know how can I save straight table at mentioned location.
Hi Gaur,
I usde the following macro and it works fine:
Sub ExportToFile
set sObject = ActiveDocument.GetSheetObject("CH01")
sObject.Export "C:\TestFile.csv", ", "
End Sub
Ensure you are using the proper objetc ID and the path exists, and those things...
Regards,
H
Hi
Limit the data in straight table and check the export and validate the paths.
As you are trying to save the file C Drive it might have some access issue, try different location.
There is no access issues to save file in C drive and also in file there are only 850 rows and 5 columns but yeah no. of rows varies and it may be more than this. Also, when I'm using some other file with less data, it is getting updated successfully at the same location. So, my question is "Is there any other way to save the data or in some other format"?
Hello Hector,
Everything is correct like Object ID, path and script as well. Any other suggestion apart from this will be helpful.
Thank you
Cpuld you attach a (reduced) sample of your application?
I can't attach the data here because it is the confidential data. Could you please let me know the other format in which I can save data of straight table.
If it is an object what you want to save, check the API options for that (like Excel, PPT, etc.) to see which other formats are allowed.
If it is a table from the script, you can STORE into CSV files.
I want to save whole data of straight table
How big is that table and how much CPU and RAM resources do you have in the computer running the macro?