Skip to main content

Notifications

Community site session details
Power Automate - Power Automate Desktop
Answered

Writing to excel file Exception from HRESULT: 0x800A03EC

Like (0) ShareShare
ReportReport
Posted on 4 Jan 2022 12:30:23 by

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

JohnJan_0-1641299405875.png

 

  • HugoRopberto Profile Picture
    3 on 22 Nov 2023 at 12:02:40
    Re: Writing to excel file Exception from HRESULT: 0x800A03EC

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

     

  • Community Power Platform Member Profile Picture
    on 04 Jan 2022 at 15:08:51
    Re: Writing to excel file Exception from HRESULT: 0x800A03EC

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

  • Verified answer
    Zave Profile Picture
    88 on 04 Jan 2022 at 14:19:39
    Re: Writing to excel file Exception from HRESULT: 0x800A03EC

    Hi,

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

  • Daniel_Pa Profile Picture
    244 on 04 Jan 2022 at 13:49:45
    Re: Writing to excel file Exception from HRESULT: 0x800A03EC

    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?

  • Community Power Platform Member Profile Picture
    on 04 Jan 2022 at 13:35:46
    Re: Writing to excel file Exception from HRESULT: 0x800A03EC

    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

  • XRQ57 Profile Picture
    206 on 04 Jan 2022 at 13:05:55
    Re: Writing to excel file Exception from HRESULT: 0x800A03EC

    Hi,

    can you share the flow?

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Power Automate Desktop

#1
eetuRobo Profile Picture

eetuRobo 18 Super User 2025 Season 1

#2
Nived_Nambiar Profile Picture

Nived_Nambiar 10 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 6

Overall leaderboard