How can I read data from an Excel file containing a macro *. XLSM. This file is not seen by BPS, after changing to *XLSX the data is read correctly.
How can I read data from an Excel file containing a macro *. XLSM. This file is not seen by BPS, after changing to *XLSX the data is read correctly.
Hi Sebastian,
Are you reading data using an Action, or is it Import to a list / dictionary?
I'll assume we are talking about action in this reply.
Could you share screenshots from configuration window?
Have you tried querying for file with SQL?
Hi Sebastian,
Are you reading data using an Action, or is it Import to a list / dictionary?
I'll assume we are talking about action in this reply.
Could you share screenshots from configuration window?
Have you tried querying for file with SQL?
Hi Maks,
I only have one attachment, I'm reading from the latest.
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.
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.
Thanks, but not working.
I think so to be some internal checks.
I'll try SQL query
SELECT ATT_ID = 97272 - id from database
When is XLSM action say "Not find attachement" after change to XLSX working.
Thanks, but not working.
I think so to be some internal checks.
I'll try SQL query
SELECT ATT_ID = 97272 - id from database
When is XLSM action say "Not find attachement" after change to XLSX working.
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.
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