This is the error I got. "Unable to cast object of type 'OfficeOpenXml.ExcelPackage' to type 'OfficeOpenXml.ExcelWorksheet'."
Raymond Reyes wrote:
I was having this error as well, but i spotted a mistake of mine.The cell writeRange asks for a worksheet object and not a workbook object. Because they are both objects, the platform suggests both of them.
You need to get the worksheet first (either by index or name) and use it there. Dont forget to cast you Record list into object.
Bruno Machado wrote:
Hi Bruno,
I've done all the steps as you mentioned. But still, I'm unable to write a column of values into the excel sheet. What I'm trying to achieve is to replace a column of values in an existing excel sheet with the values from application. I tried to write into an empty sheet as well. But still I couldn't get the values written. Cell_WriteColumnRange works for me. But that's not what I need. Would you be able to guide me here?
Anybody has a solution for this problem? I got the same error log because I 'Unable to cast object of type 'System.String' to type 'OutSystems.HubEdition.RuntimePlatform.Db.RecordList'.'