<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>Excel Data Reader - Read Excel files in .NET</title><link>http://exceldatareader.codeplex.com/project/feeds/rss</link><description>Lightweight and fast library written in C&amp;#35; for reading Microsoft Excel files &amp;#40;&amp;#39;97-2007&amp;#41;.   Cross-platform&amp;#58;   - Windows with .Net Framework 2   - Windows Mobile with Compact Framework   - Linux, OS X, BSD with Mono 2&amp;#43;</description><item><title>Created Unassigned: IndexOutOfRangeException - array for cell values too small [11881]</title><link>http://exceldatareader.codeplex.com/workitem/11881</link><description>I think the following line in method ExcelBinaryReader.readWorkSheetRow&amp;#40;&amp;#41; is wrong&amp;#58;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;m_cellsValues &amp;#61; new object&amp;#91;m_maxCol&amp;#93;&amp;#59;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;Reason&amp;#58;&lt;br /&gt;m_maxCol holds the index of the last column, not the column count. We get a &amp;#34;one-off&amp;#34; here. Just fix the line like so&amp;#58;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;m_cellsValues &amp;#61; new object&amp;#91;m_maxCol&amp;#43;1&amp;#93;&amp;#59;&lt;br /&gt;&amp;#96;&amp;#96;&amp;#96;&lt;br /&gt;</description><author>kleineswesen</author><pubDate>Tue, 18 Jun 2013 14:43:35 GMT</pubDate><guid isPermaLink="false">Created Unassigned: IndexOutOfRangeException - array for cell values too small [11881] 20130618024335P</guid></item><item><title>New Post: how to count row columns in excel</title><link>https://exceldatareader.codeplex.com/discussions/447310</link><description>&lt;div style="line-height: normal;"&gt;&lt;pre&gt;&lt;code&gt;static void Main(string[] args)
{
  string _PathFilename = @&amp;quot;C:\Temp\tri_201918.xlsx&amp;quot;;
  using (FileStream streamIn = File.Open(_PathFilename, FileMode.Open, FileAccess.Read))
  using (IExcelDataReader execlReader = (Path.GetExtension(_PathFilename) == &amp;quot;.xlsx&amp;quot; ? ExcelReaderFactory.CreateOpenXmlReader(streamIn):               ExcelReaderFactory.CreateBinaryReader(streamIn)))
  {
    DataSet ds = new DataSet();
    ds = execlReader.AsDataSet();

    int r = ds.Tables[0].Rows.Count;
    int c = ds.Tables[0].Columns.Count;
&lt;/code&gt;&lt;/pre&gt;

At this point, r has the number of rows and c has the number of columns in sheet 0.&lt;br /&gt;
&lt;/div&gt;</description><author>sholle</author><pubDate>Mon, 17 Jun 2013 19:37:12 GMT</pubDate><guid isPermaLink="false">New Post: how to count row columns in excel 20130617073712P</guid></item><item><title>New Post: how to count row columns in excel</title><link>http://exceldatareader.codeplex.com/discussions/447310</link><description>&lt;div style="line-height: normal;"&gt;i'm in progress to create an application in c# .&lt;br /&gt;
but i got a problem. i want to count how much column and row in excel file but i can't do this. &lt;br /&gt;
for example : i browse a file .xlsx. after this, i click OK and program can show number of columns and rows in this .xlsx.&lt;br /&gt;
anybody can help me?&lt;br /&gt;
thank you&lt;br /&gt;
&lt;/div&gt;</description><author>nellaindri</author><pubDate>Mon, 17 Jun 2013 17:24:30 GMT</pubDate><guid isPermaLink="false">New Post: how to count row columns in excel 20130617052430P</guid></item><item><title>Commented Unassigned: Poor performance when reading non indexed XLS file. [11827]</title><link>http://exceldatareader.codeplex.com/workitem/11827</link><description>This is based on source code downloaded on 27th May 2013. I had a file with &amp;#43;100000 records in it and this file doesn&amp;#39;t have index. So it took &amp;#126; 3 hours to complete reading that file. I debugged source code and found out that ExcelBinaryReader.moveToNextRecordNoIndex method skips all 100000 records &amp;#40;with ID &amp;#61; ROW&amp;#41; each time it reads 1 record&amp;#33; So perfomance degrades even worse when file size become bigger. According to my file&amp;#39;s structure first come all blocks with ID &amp;#61; ROW and then all blocks with ID related to cell. I don&amp;#39;t know whether this is correct structure for all files which do not have index. But I modified code and skipped all rows on sheet initialization and then just reading cells it took 40 seconds to complete large file.&lt;br /&gt;Comments: ** Comment from web user: oleh_vasylyev ** &lt;p&gt;OK, I will submit patch in the next week.&lt;/p&gt;</description><author>oleh_vasylyev</author><pubDate>Sat, 15 Jun 2013 08:26:42 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Poor performance when reading non indexed XLS file. [11827] 20130615082642A</guid></item><item><title>Patch Uploaded: #14667</title><link>https://exceldatareader.codeplex.com/SourceControl/list/patches</link><description>
&lt;p&gt;&lt;a href='https://www.codeplex.com/site/users/view/oleh_vasylyev'&gt;oleh_vasylyev&lt;/a&gt; has uploaded a patch.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Description:&lt;/b&gt;&lt;br /&gt;This is an enhancement which adds ability to get data starting from defined row and column and getting the rest of the data.&lt;/p&gt;</description><author>oleh_vasylyev</author><pubDate>Fri, 14 Jun 2013 09:54:23 GMT</pubDate><guid isPermaLink="false">Patch Uploaded: #14667 20130614095423A</guid></item><item><title>Commented Unassigned: Poor performance when reading non indexed XLS file. [11827]</title><link>http://exceldatareader.codeplex.com/workitem/11827</link><description>This is based on source code downloaded on 27th May 2013. I had a file with &amp;#43;100000 records in it and this file doesn&amp;#39;t have index. So it took &amp;#126; 3 hours to complete reading that file. I debugged source code and found out that ExcelBinaryReader.moveToNextRecordNoIndex method skips all 100000 records &amp;#40;with ID &amp;#61; ROW&amp;#41; each time it reads 1 record&amp;#33; So perfomance degrades even worse when file size become bigger. According to my file&amp;#39;s structure first come all blocks with ID &amp;#61; ROW and then all blocks with ID related to cell. I don&amp;#39;t know whether this is correct structure for all files which do not have index. But I modified code and skipped all rows on sheet initialization and then just reading cells it took 40 seconds to complete large file.&lt;br /&gt;Comments: ** Comment from web user: Ian1971 ** &lt;p&gt;That sounds like a bug. Can you post the the fix you made?&lt;/p&gt;</description><author>Ian1971</author><pubDate>Fri, 14 Jun 2013 08:27:42 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Poor performance when reading non indexed XLS file. [11827] 20130614082742A</guid></item><item><title>Commented Unassigned: Can't capture empty sheet [11864]</title><link>http://exceldatareader.codeplex.com/workitem/11864</link><description>I hava an excel file, and in Sheet1 there some data, Sheet2 and Sheet3 by default they are empty. I read data by ExcelReaderFactory.CreateOpenXmlReader&amp;#40;stream&amp;#41;.AsDataSet&amp;#40;&amp;#41;, Sheet1&amp;#39;s data is correct, but Only one DataTable int the returned dataset, I even can&amp;#39;t get Sheet2 and Sheet3&amp;#39;s name.&lt;br /&gt;  How can I do it correctly&amp;#63;&lt;br /&gt;&lt;br /&gt;  Thank you all.&lt;br /&gt;Comments: ** Comment from web user: Ian1971 ** &lt;p&gt;Does use the IDataReader interface and GetNextResult help?&lt;/p&gt;</description><author>Ian1971</author><pubDate>Fri, 14 Jun 2013 08:19:30 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Can't capture empty sheet [11864] 20130614081930A</guid></item><item><title>New Post: object reference not set to an instance of an object</title><link>http://exceldatareader.codeplex.com/discussions/446974</link><description>&lt;div style="line-height: normal;"&gt;Can you post the full stack trace?&lt;br /&gt;
&lt;/div&gt;</description><author>Ian1971</author><pubDate>Fri, 14 Jun 2013 08:17:00 GMT</pubDate><guid isPermaLink="false">New Post: object reference not set to an instance of an object 20130614081700A</guid></item><item><title>New Post: reader.AsDataSet() throws an OutOfMemory exception with even not very big excel files (30 meg)</title><link>http://exceldatareader.codeplex.com/discussions/443645</link><description>&lt;div style="line-height: normal;"&gt;something like this&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;while (excelReader.Read())
{
    var field0 = excelReader.GetInt32(0);  //where 0 is the column index. The column index can also be looked up from the name, but it is quicker to do it straight from the ordinal if you are sure the ordering isn't going to change
}&lt;/code&gt;&lt;/pre&gt;

Most features of IDataReader are supported&lt;br /&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/system.data.idatareader.aspx" rel="nofollow"&gt;http://msdn.microsoft.com/en-us/library/system.data.idatareader.aspx&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>Ian1971</author><pubDate>Fri, 14 Jun 2013 08:14:33 GMT</pubDate><guid isPermaLink="false">New Post: reader.AsDataSet() throws an OutOfMemory exception with even not very big excel files (30 meg) 20130614081433A</guid></item><item><title>Reopened Issue: Incorrect detection of the last row for certain BIFF8 files [10121]</title><link>http://exceldatareader.codeplex.com/workitem/10121</link><description>I&amp;#39;m dealing with BIFF8 documents generated by some proprietary accounting application &amp;#40;which is ubiqutous in Russia&amp;#41; and it seems in these documents the &amp;#34;last existing row&amp;#34; field from the &amp;#34;worksheet index&amp;#34; record is bogus and is less than the &amp;#40;correct&amp;#41; number available via the &amp;#34;dimensions&amp;#34; worksheet record.&lt;br /&gt;&amp;#160;&lt;br /&gt;While this can be viewed as the mentioned program violating &amp;#34;the specification&amp;#34;, native Microsoft software and OpenOffice&amp;#47;LibreOffice have no problem dealing with these files so I&amp;#39;m inclined to think we should use the max available row number from that &amp;#34;dimensions&amp;#34; sheet record if it&amp;#39;s available.&lt;br /&gt;&amp;#160;&lt;br /&gt;The attached patch contains the proposed fix.&lt;br /&gt;</description><author>Ian1971</author><pubDate>Fri, 14 Jun 2013 07:34:03 GMT</pubDate><guid isPermaLink="false">Reopened Issue: Incorrect detection of the last row for certain BIFF8 files [10121] 20130614073403A</guid></item><item><title>Reopened Issue: the Last column not read [11433]</title><link>http://exceldatareader.codeplex.com/workitem/11433</link><description>when you select an excel sheet has the first column with empty cells, then the last column in sheet will not be added to the result dataset.&lt;br /&gt;&lt;br /&gt;&amp;#124;&amp;#9;&amp;#124;  Name    &amp;#124;    Value&lt;br /&gt;&amp;#124;&amp;#9;&amp;#124;  Ahmad   &amp;#124;    123&lt;br /&gt;&amp;#124;&amp;#9;&amp;#124;  Joun&amp;#9;&amp;#124;    555&lt;br /&gt;</description><author>Ian1971</author><pubDate>Fri, 14 Jun 2013 07:34:03 GMT</pubDate><guid isPermaLink="false">Reopened Issue: the Last column not read [11433] 20130614073403A</guid></item><item><title>New Post: object reference not set to an instance of an object</title><link>http://exceldatareader.codeplex.com/discussions/446974</link><description>&lt;div style="line-height: normal;"&gt;Hi Ryan and Steve,&lt;br /&gt;
&lt;br /&gt;
Thanks for the reply. &lt;br /&gt;
&lt;br /&gt;
Actually my excel sheet is having the data in it and even it is throwing the same exception.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks for the help&lt;br /&gt;
&lt;/div&gt;</description><author>raghavainnocent</author><pubDate>Fri, 14 Jun 2013 07:32:07 GMT</pubDate><guid isPermaLink="false">New Post: object reference not set to an instance of an object 20130614073207A</guid></item><item><title>New Post: object reference not set to an instance of an object</title><link>https://exceldatareader.codeplex.com/discussions/446974</link><description>&lt;div style="line-height: normal;"&gt;You might want to try the equivalent of:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;        foreach (DataTable sheet in ds.Tables)
        {
&lt;/code&gt;&lt;/pre&gt;

And see what tables you get or if you still get errors.&lt;br /&gt;
&lt;/div&gt;</description><author>SteveHolle</author><pubDate>Thu, 13 Jun 2013 16:31:10 GMT</pubDate><guid isPermaLink="false">New Post: object reference not set to an instance of an object 20130613043110P</guid></item><item><title>New Post: object reference not set to an instance of an object</title><link>https://exceldatareader.codeplex.com/discussions/446974</link><description>&lt;div style="line-height: normal;"&gt;excelReader looks good because it has a property set on the line before, that only leaves .Tables(0) as the candidate for null.&lt;br /&gt;
&lt;br /&gt;
Can you check&lt;br /&gt;
 Tables isnot nothing&lt;br /&gt;
and also&lt;br /&gt;
 tables.count&lt;br /&gt;
&lt;br /&gt;
Then go through the tables returned and check if each element is not null.&lt;br /&gt;
&lt;br /&gt;
Can't see without a sample document really, but it might be that the first set of tables or sheet is just missing.&lt;br /&gt;
&lt;/div&gt;</description><author>RyanONeill1970</author><pubDate>Thu, 13 Jun 2013 16:20:40 GMT</pubDate><guid isPermaLink="false">New Post: object reference not set to an instance of an object 20130613042040P</guid></item><item><title>New Post: object reference not set to an instance of an object</title><link>https://exceldatareader.codeplex.com/discussions/446974</link><description>&lt;div style="line-height: normal;"&gt;Hello I have following bit of code used with the excel/csv sheets to import. I am using code plex excel dll for this purpose.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;        Dim _stream As FileStream = File.Open(Server.MapPath(&amp;quot;~/admin/DBDesigner/tempImportFolder/&amp;quot; &amp;amp; Fname),                            FileMode.Open, FileAccess.Read, FileShare.ReadWrite)
      Dim excelReader As IExcelDataReader = ExcelReaderFactory.CreateBinaryReader(_stream)
      excelReader.IsFirstRowAsColumnNames = FirstRowCols
      Dim dtTemp As DataTable = excelReader.AsDataSet().Tables(0)

&lt;/code&gt;&lt;/pre&gt;

When the control is coming to last line of the code it is throwing the exception &lt;br /&gt;
&lt;br /&gt;
--&amp;gt;object reference not set to an instance of an object&lt;br /&gt;
&lt;br /&gt;
Please help me out &lt;br /&gt;
&lt;br /&gt;
Thanks in advance&lt;br /&gt;
&lt;/div&gt;</description><author>raghavainnocent</author><pubDate>Thu, 13 Jun 2013 15:45:15 GMT</pubDate><guid isPermaLink="false">New Post: object reference not set to an instance of an object 20130613034515P</guid></item><item><title>New Post: reader.AsDataSet() throws an OutOfMemory exception with even not very big excel files (30 meg)</title><link>http://exceldatareader.codeplex.com/discussions/443645</link><description>&lt;div style="line-height: normal;"&gt;Could you give me an example of how I use IDataReader with the IExcelReaderDataReader.  I have a rather large excel file of about 15,000 rows and would love to know how to use the IDataReader.  My previous code used the dataset method to grab the data, but I think I may need to use the IDataReader since its a large amount of data.  An example of how to do this would be great!  Thanks.&lt;br /&gt;
&lt;/div&gt;</description><author>rfrancis</author><pubDate>Tue, 11 Jun 2013 20:35:28 GMT</pubDate><guid isPermaLink="false">New Post: reader.AsDataSet() throws an OutOfMemory exception with even not very big excel files (30 meg) 20130611083528P</guid></item><item><title>New Post: Google Docs XLSX IndexOutOfRangeException</title><link>http://exceldatareader.codeplex.com/discussions/446689</link><description>&lt;div style="line-height: normal;"&gt;I've not heard of it before. With the complexity and ambiguity of these specifications I'd imagine Google are doing the right thing and there is something subtle different.&lt;br /&gt;
&lt;br /&gt;
So any test cases you can muster would be very handy.&lt;br /&gt;
&lt;/div&gt;</description><author>RyanONeill1970</author><pubDate>Tue, 11 Jun 2013 18:01:17 GMT</pubDate><guid isPermaLink="false">New Post: Google Docs XLSX IndexOutOfRangeException 20130611060117P</guid></item><item><title>New Post: Google Docs XLSX IndexOutOfRangeException</title><link>http://exceldatareader.codeplex.com/discussions/446689</link><description>&lt;div style="line-height: normal;"&gt;&lt;pre&gt;&lt;code&gt;public ActionResult Index()
        {
            List&amp;lt;AirportModel&amp;gt; airports = new List&amp;lt;AirportModel&amp;gt;();
            var dataTable = new DataTable();
            FileStream stream = System.IO.File.Open(&amp;quot;C:/Users/jordan.bostrom/Documents/goog.xlsx&amp;quot;, FileMode.Open, FileAccess.Read);
            using (IExcelDataReader excelReader = ExcelReaderFactory.CreateOpenXmlReader(stream))
            {          
                excelReader.IsFirstRowAsColumnNames = true;
                DataSet result = excelReader.AsDataSet();

                dataTable = result.Tables[0];
            }                      

                        
            using (SqlConnection connSql = new SqlConnection(ConfigurationManager.ConnectionStrings[&amp;quot;Testing&amp;quot;].ConnectionString))
            {
                connSql.Open();
                using (SqlCommand cmdSql = new SqlCommand(&amp;quot;[dbo].[Do_Stuff]&amp;quot;, connSql))
                {
                    cmdSql.CommandType = CommandType.StoredProcedure;
                    cmdSql.Parameters.AddWithValue(&amp;quot;@TableInput&amp;quot;, dataTable);
                    using (SqlDataReader reader = cmdSql.ExecuteReader())
                    {
                        while (reader.Read())
                        {
                            AirportModel airport = new AirportModel();
                            airport.IATA = reader.GetString(0);
                            airport.AirportName = reader.GetString(1);
                            airport.AirportCity = reader.GetString(2);
                            airport.Country = reader.GetString(3);
                            airports.Add(airport);
                        }
                    }
                }
                
            }
            return View(airports);
        }&lt;/code&gt;&lt;/pre&gt;

XLS and XLSX files from MS Office and LibreOffice are being read perfectly using this method, but the Google Docs format fails for some reason. I'm looking into the issue and will report back if I find anything. Is this a known issue? The error says that no table (dataTable = result.Tables[0];) has been found.&lt;br /&gt;
&lt;/div&gt;</description><author>jordannb</author><pubDate>Tue, 11 Jun 2013 14:56:13 GMT</pubDate><guid isPermaLink="false">New Post: Google Docs XLSX IndexOutOfRangeException 20130611025613P</guid></item><item><title>Commented Unassigned: Can't capture empty sheet [11864]</title><link>http://exceldatareader.codeplex.com/workitem/11864</link><description>I hava an excel file, and in Sheet1 there some data, Sheet2 and Sheet3 by default they are empty. I read data by ExcelReaderFactory.CreateOpenXmlReader&amp;#40;stream&amp;#41;.AsDataSet&amp;#40;&amp;#41;, Sheet1&amp;#39;s data is correct, but Only one DataTable int the returned dataset, I even can&amp;#39;t get Sheet2 and Sheet3&amp;#39;s name.&lt;br /&gt;  How can I do it correctly&amp;#63;&lt;br /&gt;&lt;br /&gt;  Thank you all.&lt;br /&gt;Comments: ** Comment from web user: dearymz ** &lt;p&gt;Yes, this is a side point really.&lt;br&gt;But Excel Data Reader's view is different from an Excel'view, that if I use more than one difference excel SDKs, only Excel Data Reader is special.&lt;br&gt;This issue is not hugrry, if it is easy to implement, better.&lt;br&gt;Thanks SteveHolle.&lt;/p&gt;</description><author>dearymz</author><pubDate>Sun, 09 Jun 2013 10:21:42 GMT</pubDate><guid isPermaLink="false">Commented Unassigned: Can't capture empty sheet [11864] 20130609102142A</guid></item><item><title>New Post: reader.AsDataSet() throws an OutOfMemory exception with even not very big excel files (30 meg)</title><link>http://exceldatareader.codeplex.com/discussions/443645</link><description>&lt;div style="line-height: normal;"&gt;
&lt;div&gt;
&lt;div&gt;The problem was in the excel file, even though it only contained 19k rows, the reader was reading 1.6 Mil rows from it. All other readers also detected that the file had 1.6 mil rows...&lt;br&gt;
&lt;br&gt;
Sent from my iPad&lt;/div&gt;
&lt;div&gt;&lt;br&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description><author>taralex</author><pubDate>Sat, 08 Jun 2013 13:44:06 GMT</pubDate><guid isPermaLink="false">New Post: reader.AsDataSet() throws an OutOfMemory exception with even not very big excel files (30 meg) 20130608014406P</guid></item></channel></rss>