web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Writing to excel file ...
Power Automate
Answered

Writing to excel file Exception from HRESULT: 0x800A03EC

(0) ShareShare
ReportReport
Posted on by

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

JohnJan_0-1641299405875.png

 

I have the same question (0)
  • XRQ57 Profile Picture
    206 on at

    Hi,

    can you share the flow?

     

  • Community Power Platform Member Profile Picture
    on at

    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 Profile Picture
    244 on at

    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?

  • Verified answer
    Zave Profile Picture
    88 on at

    Hi,

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

  • Community Power Platform Member Profile Picture
    on at

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

  • HugoRopberto Profile Picture
    3 on at

    Really the comment in this case belong to a "missed Drive letter"; so the explaination provided is fine, obviouly with the Monday Newspaper.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard