Ole Error 800a03ec Delphi Excel
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies
Ole Error 800a03ec Excel 2013
of this site About Us Learn more about Stack Overflow the company Business excel output failed ole error 800a03ec Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges microsoft office excel error '800a03ec' Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute:
Ole Error 800ac472
Sign up Saving Excel workbook as PDF gives me an OLE error 800A03EC up vote 1 down vote favorite I have the following function that I want to use for creating a PDF from Excel. But when trying to save the PDF I get an OLE error 800A03EC that I simply can't figure out. I use the same approach to create PDF from
800a03ec Vbscript Error
Word and that works just fine. function xlsCreatePdf(aInput: string; aOutput: string = ''): string; var FileDoc: OleVariant; FilePDF: OleVariant; ExcelBook: ExcelWorkbook; PdfName: string; ExcelApp: ExcelApplication; begin Result := ''; if aOutput = '' then begin PdfName := Folders.DirOutput + ExtractFileName(aInput); PdfName := ChangeFileExt(PdfName, '.pdf'); end else PdfName := aOutput; if (Files.Validate(aInput)) then begin if not Assigned(ExcelApp) then ExcelApp := xlsInitialize; FileDoc := aInput; ExcelBook := ExcelApp.Workbooks.Open(FileDoc, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam, DefaultLCID); FilePdf := PdfName; ExcelBook.SaveAs(FilePdf, xlTypePDF, EmptyParam, EmptyParam, False, False, xlNoChange, xlUserResolution, False, EmptyParam, EmptyParam, EmptyParam, DefaultLCID); xlsFreeAndNil(ExcelApp); if (Files.Validate(PdfName)) then Result := PdfName else Result := ''; end; end; I initialize Excel using function xlsInitialize: ExcelApplication; var ExcelApp: ExcelApplication; begin DefaultLCID := LOCALE_USER_DEFAULT; ExcelApp := CreateOleObject('Excel.Application') as ExcelApplication; if Assigned(ExcelApp) then begin Result := ExcelApp; ExcelApp.Visible[DefaultLCID] := True; end else raise Exception.Create('Cannot initialize Excel application'); end; And it should be closed using procedure xlsFreeAndNil(var ExcelApp: ExcelApplication); var i: integer; begin if Assigned(ExcelApp) then begin for i := 0 to ExcelApp.WorkBooks.Count - 1 do ExcelApp.WorkBooks.Close(DefaultLCID); ExcelApp.Quit; Pointer(ExcelApp) := Nil; end; end; I am using Del
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit 800a03ec excel saveas Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > OLE Error 800A03EC Want to Advertise Here? Solved OLE Error 800A03EC Posted on 2012-11-22 MS Excel Delphi 1 Verified Solution 17 Comments 10,536 Views Last Modified: 2012-11-26 I am experiencing an OLE-Error 800A03EC which happens on a Windows XP 32-bit Service Pack 2 PC running Excel 2003. This happens when I try to http://stackoverflow.com/questions/30774976/saving-excel-workbook-as-pdf-gives-me-an-ole-error-800a03ec open a new workbook from Delphi 7, using the following commands try ExcelApp := CreateOleObject('Excel.Application'); except ShowMessage('Cannot start Excel/Excel not installed?'); Exit; end; ExcelApp.Workbooks.Add(-4167); // Add a new Workbook ExcelApp.Workbooks.Open(XLSstring); // Open a Workbook The Delphi program works perfectly on several different PC's all running different operating systems and different versions of Excel. But https://www.experts-exchange.com/questions/27944523/OLE-Error-800A03EC.html I have two PC's that it fails on. The one described above, and a Windows 7 PC running Excel 2007. I'm starting to think it must be regional settings or some sort of admin rights / operating system policies... Anyone have experience or ideas which with this OLE error? Thanks very much for your support in advance. Jon 0 Question by:JonathanGSK Facebook Twitter LinkedIn Google LVL 19 Active 3 days ago Best Solution byThommy ...and what is this??? ExcelApp.Range['A1:OM1'].Font.Bold:=True; ExcelApp.Range['D1:ON1'].ColumnWidth := 10 'A1:OM1' and 'D1:ON1' are not valid ranges!!! Try that and I'm sure that it will work... Go to Solution 17 Comments LVL 25 Overall: Level 25 Delphi 25 MS Excel 1 Message Active today Expert Comment by:Sinisa Vuk2012-11-22 Try to add worksheet without -4167 number. Look at a great example on ms site!! :-) http://support.microsoft.com/kb/231614 0 LVL 19 Overall: Level 19 Delphi 16 MS Excel 2 Message Active 3 days ago Expert Comment by:Thommy2012-11-22 What do you want to do? Open an existing workbook or a new one? To open a new Workbook: ExcelApp.WorkBooks.Add; Just call it without any parameter like -4167... To open an existing Workbook: ExcelApp.WorkBooks.Open(
Fast Reports forum>Fast Reports Products>FastReport 3.0 2 Pages 12> error when export a excel files Options lancelotshui View Member Profile https://www.fast-report.com/en/forum/index.php?showtopic=1964 Mar 2 2005, 03:44 AM Post #1 Newbie Group: Members Posts: 4 Joined: 8-February 04 Member No.: 391 when I export the report as a excel file.it always encounter errorit said "project xxx raised exception EOleException with message 'OLE error 800A03EC'".what had happened jdorlon View Member Profile Mar 2 2005, 10:48 AM Post #2 Newbie Group: Members Posts: 7 Joined: ole error 2-March 05 Member No.: 1764 more info: I have seen this too with excel 2003, but not with prior versions. lancelotshui View Member Profile Mar 2 2005, 06:24 PM Post #3 Newbie Group: Members Posts: 4 Joined: 8-February 04 Member No.: 391 I'm using win2k advanced server + delphi 7 enterprise + offiice 2k/ AlexTZ View Member Profile Mar 4 ole error 800a03ec 2005, 02:12 PM Post #4 Advanced Member Group: FR Team Posts: 2982 Joined: 16-October 03 Member No.: 4 Does this error happen when you export any report or only some kind of report? lancelotshui View Member Profile Mar 4 2005, 07:08 PM Post #5 Newbie Group: Members Posts: 4 Joined: 8-February 04 Member No.: 391 pdf,rtf,jpg,bmp are all okerror only happen in excel expor, AlexTZ View Member Profile Mar 7 2005, 04:58 AM Post #6 Advanced Member Group: FR Team Posts: 2982 Joined: 16-October 03 Member No.: 4 Please send the .fr3 and .fp3 files (.fp3 - save from preview) to tz@fast-report.com adolfo View Member Profile Mar 7 2005, 04:14 PM Post #7 Newbie Group: Members Posts: 2 Joined: 1-November 04 Member No.: 1294 I just have the same problem.Hope can be solved soon.Adolfo ftorres View Member Profile Apr 26 2005, 01:14 PM Post #8 Newbie Group: Members Posts: 4 Joined: 3-March 05 Member No.: 1771 I have the same problem for FR3 + Delphi7 on WinXP Pro ftorres View Member Profile Apr 27 2005, 08:08 AM Po