VB.net另存为Calc文件异常 [英] VB.net save as calc file exception
本文介绍了VB.net另存为Calc文件异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在VB.NET中如何另存为打开的办公室Calc文件.
In VB.NET HOW to saveas the open office Calc file.
oDoc.storeToURL("file:///C:\Documents and Settings\rajasekar.k\Desktop\I.xls", 0, arg)
尝试上面的代码时,它显示异常.
请帮忙.
[edit]已修复代码块,将我的内容作为纯文本..."选项已禁用-OriginalGriff [/edit]
While trying the above code it shows exception.
Please help.
[edit]Code block fixed, "Treat my content as plain text..." option disabled - OriginalGriff[/edit]
推荐答案
看了一个例子之后地点.大约三分之一的位置是用于保存文件的代码.
http://www.oooforum.org/forum/viewtopic.phtml?t=4996
首先,您知道您的文件路径是否适用于XP风格的系统?
根据示例,您似乎跳过了一步.
该示例显示:
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 :
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.
这篇关于VB.net另存为Calc文件异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文