Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reading empty cell issue #84

Closed
rajashree1402 opened this issue Oct 31, 2016 · 1 comment
Closed

reading empty cell issue #84

rajashree1402 opened this issue Oct 31, 2016 · 1 comment

Comments

@rajashree1402
Copy link

sorry but this is not working :
this is my code
Stream stream = new MemoryStream(ReadFile(File));
using (XLWorkbook workBook = new XLWorkbook(stream))
{
//Read the first Sheet from Excel file.
IXLWorksheet workSheet = workBook.Worksheet(1);

            //Create a new DataTable.

            //Loop through the Worksheet rows.
            bool firstRow = true;
            bool error = false;
            foreach (IXLRow row in workSheet.Rows())
            {
                foreach (IXLCell cell in row.Cells())
                            {
                                if (cellCnt < 11)
                                {
                                    dt.Columns.Add(cell.Value.ToString());
                                }
                                else
                                {
                                    break;
                                }
                                cellCnt++;
                                firstRow = false;
                            }

}

what is happening here when i go for header its showing 20 cells
but in data row it showing 19 . as one contain blank value . But we need the blank value also.Please suggest where to modify it..

@igitur
Copy link
Member

igitur commented Oct 31, 2016

Please don't open a new issue for a comment. Please post your comment to #82 .

@igitur igitur closed this as completed Oct 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants