[Advanced Excel] Error: A disk error occurred during a write operation. (Exception from HRESULT: 0x800

[Advanced Excel] Error: A disk error occurred during a write operation. (Exception from HRESULT: 0x800

  
Forge Component
(21)
Published on 5 Nov by João Rosado
21 votes
Published on 5 Nov by João Rosado
In the excel files that I am using, first row are the title/header of the values

I want to get the text of those header

Fellowing are widgets in Upload Button Action

First I use

Workbook_Open_BinaryData with Upload1.Content as its parameter

then

Worksheet_SelectByIndex with parameter: Workbook_Open_BinaryData.Workbook & 1

then Assign Widget Column = 1

then 

Cell_ReadByIndex with parameter: Worksheet_SelectByIndex.Worksheet & 1 & Column

then assign Query = Query + "SELECT ''," + Row + ",'" + Cell_ReadByIndex.CellValue + "' UNION "

then If Statement Widget condition: Cell_ReadByIndex.CellValue=""

If false then widget assign:
Column = Column +1 then go back to

Cell_ReadByIndex with parameter: Worksheet_SelectByIndex.Worksheet & 1 & Column

Thus creating a loop and Query variable end up looking like

SELECT '',1,'ItemNumber'
UNION
SELECT '',2,'ItemDesc'
UNION
SELECT '',3,'Department'
UNION

Finally if true then

Workbook_Close

Then

Refresh Query1 with paramenter In1 = Substr(Query,0,Length(Query)-6)

While Query1 in the Preparation is just @In1 with the setting Expand Inline=Yes

Then create a TableRecord to view the query

Everything seems right ... but ended getting this error.... when I try to upload an excel file

?Error: A disk error occurred during a write operation. (Exception from HRESULT: 0x800

Weird now the error is showing

Attempted to access an unloaded appdomain. (Exception from HRESULT: 0x80131014)
We got the same error yesterday (a lot of them for it is called by a timer). Early today, we tried running the timer again that calls the action but got no errors. The problem is we didn't do anything at all.

What could be the possible reasons for this to occur?