XLS File Is Not Being Parsed Correctly - excel

I have two XLS files. Both are server generated. One is from our bank (account statement) and the other is an internal ledger report from our company's web portal. I am trying to read both files within my Retool app.
The first one is read successfully using the following piece of code (ignore the splices. I am just getting rid of some useless rows).
As you can see, I am getting the correct data from this file (visible in the table).
Now if I try the second file, I get this:
As you can see, the parsed value is showing some strange values. I do not know what to do here. I would really appreciate it if someone could point me in the right direction.

Related

Sending recently created Sharepoint-file as attachment with Power Automate

After some months I could say I am getting the hang of Microsoft Flow, however I could use some help with the following issue:
In a flow for reporting purposes, a temporary file (.xlsx) is created in a sharepoint folder by means of a template. This temporary file is then filled with rows and info from other sources. So far so good.
I use the body of this newly created and furnished file as an attachment for an e-mail to the chief. However, the attachment came out identical to the (empty) template file, without the rows and furnishing.
Adding a delay of two minutes before attaching and sending the mail solved it for relatively small reports, but this is not ideal as I want it to work regardless of file size. Furthermore I do not understand why it would send an empty (old) version of the temp. file in the first place, as all the furnishing operations should have executed before copying and attaching (the flow is entirely in series).
Sorry for the long story. Does anyone have a more elegant solution than using a Delay-node?

Is this response normal in Amazon MWS reports?

Hi. I am trying Amazon MWS for the first time. I have referred to - https://docs.developer.amazonservices.com/en_UK/reports/Reports_Overview.html
I made a call as shown in the diagram on that page. I am using the scratchpad.
Called the Request Report with required fields. In this case ReportType -
"_GET_MERCHANT_LISTINGS_DATA_"
Then I called the GetReportRequestList with the "ReportRequestId"
returned from the previous call.
Finally I am calling the - "GetReport" with the "GeneratedReportId"
which I got from the call previous to this and I get the response as
the above image.
I have no idea how to parse and use it. Can't make any sense about the format returned in the final call (Shown in the image).
If anyone worked with this API. Please point me to the right direction.
Thanks in advance
Depending on the ReportType, you'll either get a XML file or a CSV file back. The ReportType enumeration page in the docs will tell you which is which. While the XML format is somewhat well documented here, the CSV files are not, but most should be self-explanatory. _GET_MERCHANT_LISTINGS_DATA_ returns such a CSV file. You may be confused by the fact that one of its fields contains some HTML.
Since you don't state which programming language you intend to use: You can open a CSV file in Excel (or LibreOffice). Please note that unlike most CSV files, these are separated by tabs, not by commas or semicolons. Also, to answer your initial question: yes, this is normal.

Export Sharepoint list to .csv and upload to Azure Data Lake Using Flow

I am trying to using Microsoft Flow to export a Sharepoint List to Azure Data Lake.
I want it so that anytime a particular online list is changed, its entire contents are loaded into a file in Data Lake. If the file already exists, I want to overwrite it. Can someone please explain how I can go about doing this, I have tried multiple ways, but they are not getting the job done.
Thanks
I was able to get the items in the SharePoint list to near perfection. I will post the Flow here in case anyone in the future needs it.
So what I did is that every 5 minutes I "create" a file in Azure Data Lake which overwrites the file if it exists. The content of the files cannot be blank, so I added a newline to the content. Then I use Get Items to retrieve all the items in the SharePoint List. From there, using an Apply to each loop, I append the content of the current row of the Sharepoint list to the Data Lake file (separated by | and ending with a new line after all the content is added). This works to near perfection, with the only caveat being the newline at the beginning of the file, which I eliminate using PowerQuery.
This is exactly what I needed. If anybody sees a way to make this better, please post so that we can get this to perfection.

Accessing Excel over SharePoint with Graph API returns invalid URL error

I have a Sharepoint with multiple drives that contains an Excel file (xlsx) of which I'd like to return some data.
I have successfully found the Excel file through lists with a GET:
https://graph.microsoft.com/beta/sites/COMPANY.sharepoint.com:/teams/TEAM:/lists/LONGID/items/LONGID/
Which leads to the Excel file. If I try to start a session by POSTing to excelfile/workbook/createSession with { "persistChanges": false } as body, I get a "Resource not found for the segment 'workbook'" error.
Thinking it was because I was working with a listitem, I have been trying to find the file through the drive afterwards but any which way, I can not access any drives.
https://graph.microsoft.com/beta/sites/COMPANY.sharepoint.com:/teams/TEAM:/drives
Above link returns all the drives. Accessing a drive by going to
drives/LONGID/root
drives/LONGID/root/children
drives/LONGID/items
drive/LONGID/root
drive/LONGID/root/children
drive/LONGID/items
returns a "Url specified is invalid". It's the same for accessing files in the default drive.
Any help would be appreciated!
You have correctly guessed that in the first case you are querying listItem which is not a driveItem. You've gotten very close to figuring out the correct URL on your own.
What you can leverage is the fact that every SharePoint list is a drive. Then, you can do the following:
GET https://graph.microsoft.com/beta/sites/SITE_ID/lists/LIST_ID/drive/items/ITEM_ID/workbook/worksheets.
I use the ID notation for shortness, but the :/path: notation works for sites, lists, and driveItems.
Let me know if this still doesn't work.
Thanks,
Zlatko

MS Access Error: "External table not in the expected format" when trying to open linked table which previously worked

I have some queries in my Access database which pull data from Excel files that appear in the database as linked tables. They have worked just fine, until suddenly and inexplicably I was getting the error "External table is not in the expected format," when trying to access them.
I thought it might have to do with the fact that I was using a macro-enabled workbook, but it was fine before. I do have a mail merge set up in Word which is linked to the database, and using one of the aforementioned queries.
It turns out that the issue was due to the mail merge document. Once I saved and closed the mail merge file in Word and tried accessing the queries and tables again in Access, the error was no longer appearing.
It seems that if a Word mail merge is connected to the database, this error may appear. I am not sure as to why a more appropriate error is not appearing; after testing it seems to happen regardless of whether the linked file is a macro-enabled workbook or not.
In short, as Olivier put it, the file was locked by Word. A simple issue, but not exactly clear given the error message (unless you follow Andre's logic that the expected format is a non-locked file, hahah).
I hope this helps someone else!
My form is hooked to a query. The "not in expected format" message happens when the query is set up as a "snapshot". When I changed to "dynaset", the form started to work as expected.

Resources