Error 21352 accessing .xlsx file from blob storage in ADF

Mike Langlois 15 Reputation points
2024-09-25T12:09:04.9033333+00:00

Hi there, I have a copy activity in ADF that is set to use a .xlsx file in our blob storage as its 'source'. When connecting to the .xlsx file, I can see it in adf just fine:User's image

But when trying to select a sheet within the .xlsx file, it gives me an error:

User's image

The error message is:

Only '.xls' and '.xlsx' format is supported in reading excel file while error is ' at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) at NPOI.SS.Util.SimpleDateFormat.ParseObject(String source, Int32 pos) at NPOI.OpenXml4Net.OPC.Internal.PackagePropertiesPart.SetDateValue(String s) at NPOI.OpenXml4Net.OPC.Internal.PackagePropertiesPart.SetCreatedProperty(String created) at NPOI.OpenXml4Net.OPC.Internal.Unmarshallers.PackagePropertiesUnmarshaller.Unmarshall(UnmarshallContext context, Stream in1) at NPOI.OpenXml4Net.OPC.OPCPackage.GetParts() at NPOI.OpenXml4Net.OPC.OPCPackage.Open(Stream in1) at NPOI.Util.PackageHelper.Open(Stream is1) at NPOI.XSSF.UserModel.XSSFWorkbook..ctor(Stream is1) at Microsoft.DataTransfer.ClientLibrary.ExcelUtility.GetExcelWorkbook(String fileExtension, TransferStream stream)'. String was not recognized as a valid DateTime.

Has anyone come across this and would know how to solve it? Its a pretty bog-standard .xlsx file, but it comes from a third party supplier into our blob storage so can't make any amendments to it.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,637 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Pinaki Ghatak 5,600 Reputation points Microsoft Employee Volunteer Moderator
    2024-10-08T19:26:33.19+00:00

    Hello @Mike Langlois

    The error message you shared suggests that the file format is not supported. According to the Azure Data Factory documentation, both ".xls" and ".xlsx" formats are supported for Excel files.

    However, the error message you received suggests that there may be an issue with the file itself. One thing you could try is to check if the file is corrupted or has any issues with its formatting. You could also try opening the file in Excel to see if there are any issues with it.

    If the file seems to be fine, you could try using a different method to read the data from the file. For example, you could try using a different connector or a different activity type.

    I hope this helps.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.