We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Empty excel file

Hello I import data from excel using workbook.Worksheets[0.ExportDataTable, now the problem is with the empty excel files, could please tell me how can i test if the file to import from excel is empty or not, i''d like to prevent choosing empty files. Thanks in advance,

1 Reply

AD Administrator Syncfusion Team May 15, 2006 10:51 AM UTC

Hi, Sorry for the delay in getting you. Please use the code below to detect whether a sheet contains data. sheet.UsedRange.IsBlank==true Please take a look at the attachment and let me know if you have any questions. EmptyDetector.zip BestRegards, Bharath

Loader.
Live Chat Icon For mobile
Up arrow icon