web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

read xlsx file

(0) ShareShare
ReportReport
Posted on by 70

i'm trying to read xlsx file in xmlport but i get error:  '', hexadecimal value 0x03, is an invalid character. Line 1, position 81.

but when i copy the data too csv it works fine. is there anyway to fix this?

I have the same question (0)
  • Suggested answer
    THE Italian Profile Picture
    on at

    XLSX is not a pure XML file. 

    If you rename XLSX into zip and then extract that, then you will see that is made of a lot of files. 

    If you have an XSLX file you should read it through Excel utilities. You might find some piece of code inside the standard application how to handle XLSX files (e.g. check rapidstart).

  • Verified answer
    Community Member Profile Picture
    on at

    You can refer to "Import budget from Excel" report on how to import excel file. But you need to change the import file to use Stream if you are using business central cloud.

    You can use below code upload file to blob

    FileMgt.BLOBImport(TempBlob, ImprtExcelFileTxt);

    Use below code to get excel sheet from stream

    SheetName := ExcelBuf.SelectSheetsNameStream(IStream);

    Use below code to read the excel book from stream

    ExcelBuf.OpenBookStream(IStream, SheetName);
  • samerabd Profile Picture
    70 on at

    so i should import the file using excel buffer right?

    and can i skip columns and rows in excel buffer?

  • samerabd Profile Picture
    70 on at

    ty both i did it i had to remove all xml code and make excel buffer to get the data, thank you

  • Suggested answer
    THE Italian Profile Picture
    on at

    Please mark this thread as answered then, many thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,229

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,867 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans