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

Privacy overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.


To see a full list of the cookies we use and learn more about their purposes, visit our Privacy Policy.