Click here to Skip to main content
15,915,093 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In VB.NET HOW to saveas the open office Calc file.

VB
oDoc.storeToURL("file:///C:\Documents and Settings\rajasekar.k\Desktop\I.xls", 0, arg)

While trying the above code it shows exception.

Please help.

[edit]Code block fixed, "Treat my content as plain text..." option disabled - OriginalGriff[/edit]
Posted
Updated 18-Dec-11 23:33pm
v2
Comments
Richard MacCutchan 19-Dec-11 6:12am    
What exception? We cannot see the messages on your screen!
Dave Kreskowiak 19-Dec-11 19:00pm    
...and that exception would be ........ what?? Copy and paste it into your post.

1 solution

After looking at an example On this site. About a third of the way down is the code for saving the file.
http://www.oooforum.org/forum/viewtopic.phtml?t=4996

First of all you know your file path is for a XP style system correct ?
According to the example you seem to be skipping a step.
The example shows :
VB
cFile = "C:\Documents and Settings\dbrewer\Desktop\MyCalc" ' Windows
  ' Now save it in Excel format.
  cURL = ConvertToURL( cFile + ".xls" )
  oDoc.storeToURL( cURL, Array( MakePropertyValue( "FilterName", "MS Excel 97" ) ) )


Hope this helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900