cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JohnJan
Frequent Visitor

Writing to excel file Exception from HRESULT: 0x800A03EC

Writing to excel file throws error Exception from HRESULT: 0x800A03EC

JohnJan_0-1641299405875.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Zave
Resolver I
Resolver I

Hi,

I'd suggest changing the row from 0 to 1, for the "Write to Excel worksheet" action.

View solution in original post

5 REPLIES 5
XRQ57
Resolver I
Resolver I

Hi,

can you share the flow?

 

JohnJan
Frequent Visitor

Sure! - there are a couple of booleans.... but you can ignore the ifs part.

Thanks!

 

Excel.LaunchExcel.LaunchAndOpen Path: DocumentsUploadedFilePath Visible: False ReadOnly: False LoadAddInsAndMacros: False Instance=> UpdateReport
Excel.ReadFromExcel.ReadAllCells Instance: UpdateReport ReadAsText: False FirstLineIsHeader: True RangeValue=> DownloadedFiles
Excel.CloseExcel.Close Instance: UpdateReport
LOOP FOREACH CurrentDownloadedFile IN DownloadedFiles
IF CurrentDownloadedFile[0] = SalesNatXMLFilePath THEN
DISABLE SET DownloadedFiles[LoopRowCount - 2] TO FileNat
SET boolNewFileNat TO $'''False'''
END
IF CurrentDownloadedFile[0] = SalesJudXMLFilePath THEN
DISABLE SET DownloadedFiles[LoopRowCount - 2] TO FileJudStatus
SET boolNewFileNat TO $'''False'''
END
Variables.IncreaseVariable Value: LoopRowCount IncrementValue: 1 IncreasedValue=> LoopRowCount
END
IF boolNewFileNat = $'''True''' THEN
SET DownloadedFiles TO DownloadedFiles + [SalesNatXMLFilePath, FileNatStatus, Date]
Variables.IncreaseVariable Value: LoopRowCount IncrementValue: 1 IncreasedValue=> LoopRowCount
END
IF boolNewFileJud = $'''True''' THEN
SET DownloadedFiles TO DownloadedFiles + [SalesJudXMLFilePath, FileJudStatus, Date]
END
WAIT 2
System.TerminateProcess.TerminateProcessByName ProcessName: $'''EXCEL'''
WAIT 2
Excel.LaunchExcel.Launch Visible: False LoadAddInsAndMacros: False Instance=> WriteUpdate
Excel.WriteToExcel.WriteCell Instance: WriteUpdate Value: DownloadedFiles Column: $'''A''' Row: 0
Excel.SaveExcel.SaveAs Instance: WriteUpdate DocumentFormat: Excel.ExcelFormat.FromExtension DocumentPath: DocumentsUploadedFilePath
Excel.CloseExcel.Close Instance: WriteUpdate

Daniel_Pa
Resolver II
Resolver II

A quick google search indicates that the error can be related to several things in Excel: "The error code 

0x800A03EC (or -2146827284) means NAME_NOT_FOUND; in other words, you've asked for something, and Excel can't find it."

 

Could it be that what you are trying to write to Excel does not conform to the size or format of the sheet? I see that you populate the DownloadedFiles-variable with other variables - this might be part of the issue? Could be that the list is longer than what fits into the sheet or the format isn't accepted?

Zave
Resolver I
Resolver I

Hi,

I'd suggest changing the row from 0 to 1, for the "Write to Excel worksheet" action.

JohnJan
Frequent Visitor

mind blowing.... who would have thought? Thanks a lot!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Top Kudoed Authors
Users online (3,943)