Home > Forum > Actions > Read data from *.XLSM

Read data from *.XLSM
0

MVP
In reply to: Sebastian Chytryk

Hi Maks,

I only have one attachment, I'm reading from the latest.

There is probably a reason, why .xlsm are not recognized by default, as it might be considered a security risk - VBA is really old, and often used in phishing.
With that in mind, you can try using below SQL query, to get latest excel file attached to an instance:

SELECT TOP 1
ATT_ID
FROM
WFDataAttachmets
WHERE
ATT_WFDID = {WFD_ID} AND
ATT_FileType IN ('.xlsx', '.xlsm', '.xls')
ORDER BY
ATT_TSUpdate DESC

This will pass specific attachment ID to the action, so it should at least try to work with it, and won't say it's not there. There might be some internal checks for .xlsm, and if this won't work I'm out of ideas.

MVP
In reply to: Bartłomiej Spyrka (WEBCON)

Dear all,

reading data from excel file is limited to *.xlsx
https://docs.webcon.com/docs/2023R3/Studio/Action/GenerateDoc/Action_ReadDataFromExcelWorksheet


To be able to read data from other extension file types (here *.xlsm) I guess you need to consider usage of SDK action.

Hi all,

before going down the SDK road, how about doing the "rename" in the automation before the action is executed?

Ok, it's more like copying the attachment and using a new name, but It's working:

SELECT ATT_Value, 'TempExcelFile.xlsx' AS FileName, *
from WFDataAttachmets
where ATT_WFDID = {WFD_ID}
and ATT_ISDELETED = 0

Explanation of the "Based on SQL query" mode:
https://docs.webcon.com/docs/2023R3/Studio/Action/Attachments/Action_AddAttachment#5-based-on-sql-query



Best regards,
Daniel

Did you know that with WEBCON you can automate virtually any process? Even baking cookies 🍪
 
Speaking of cookies: we use the ones that are essential for our website to function properly, as well as additional ones that help us customize our content to your preferences. If you don’t mind cookies, click Accept. If you want to learn more, explore settings.
Settings