Tag: ole

在Excel上执行多个更新命令

我有一个Excel文件,我想更新表中的多行。所以我写这个代码: OleDbConnection cn = new OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = " + serverPath + ";Extended Properties = Excel 8.0;"); try { strUpd = ""; strUpd += "update [Data14City$] set B_1_1 = 5 ,B_1_2 = 26 ,B_1_3 = 44 ,B_1_4 = 8 where id = 1 "; strUpd += " update [Data14City$] set B_1_1 = […]

为什么Win32 :: OLE不能与Win2003下的Excel2003对话?

我有一个基于Web的Perl Win32 :: OLE脚本,它在服务器端使用Excel。 在运行Excel2000的Win2000服务器上,它一直在愉快地工作多年。 我们最近升级到Win2003 / Excel2003,现在我得到脚本中的以下错误: Win32::OLE(0.1709) error 0x80070005: "Access is denied" at create_worksheet_lib.plx line 639 eval {…} called at create_worksheet_lib.plx line 639 639行是: $Excel = Win32::OLE->new('Excel.Application', sub {$_[0]->Quit;}) or die "Oops, cannot start Excel"; 看来,Perl不再有权访问Excel。 任何Windows专家可能会帮助解决这个问题吗?

什么是检查Excel OLE是否可用的正确方法?

我需要testing我的程序是否可以使用Excel OLE,因为它可以在没有Excel的PC上启动。 在网上的代码示例假设安装了Excel,但如果不是? XLApp := CreateOleObject('Excel.Application'); try // Hide Excel XLApp.Visible := False; // Open the Workbook XLApp.Workbooks.Open(aPath); …snip… finally // Quit Excel if not VarIsEmpty(XLApp) then begin XLApp.Quit; XLAPP := Unassigned; end; end; 这是否是正确的代码来查找是否安装了Excel? //Try to create Excel OLE try XLApp := CreateOleObject('Excel.Application'); except ShowMessage('Error opening Excel'); Exit; end;

使用Apache POI将文件embeddedExcel

我正在使用Apache POI将数据导出到Excel文件。 在一个奇怪的要求中,我需要使用这个POI在Excel中embedded一个文件。 我有这个文件,可以被采取成stream或字节数组。 search了很多时间之后,我确信POI是否真的支持我的要求。 我们可以将文件embedded到Excel中吗? 🙁 干杯,Anoop