How to get column width using ExcelDataReader library?











up vote
1
down vote

favorite












I know how to get RowHeight



using(var xls2003Stream = new MemoryStream(xlsBytes)) 
{
using(var reader = ExcelReaderFactory.CreateReader(xls2003Stream))
{
var height = reader.RowHeight;
...
}
}


but the question is - can I get the column width using the ExcelDataReader library?










share|improve this question




















  • 1




    ExcelDataReader is meant to read Excel data, not formatting. The reader doesn't know about rows or heights, it knows how to read the next row and get column values from that row. What are you trying to do? If you care about formatting you probably need a different library, like EPPlus
    – Panagiotis Kanavos
    Nov 8 at 14:36












  • Yes i've got concept of that library, but for me it looks a bit weird that they created property RowHeight and no ColumnWidth. Anyway, it would be great if you will suggest me library which can read Excel2003 format with .NET Core support. I didn't found one.
    – Mr-Cas
    Nov 8 at 17:11










  • xls was abandoned 12 years ago. The format used by Excel is xlsx, a zip package containing XML files. The only reliable way to handle the obsolete format is to install Excel. That's impossible for servers or third-party applications, which is part of the reason it was abanadoned. Google Sheets doesn't support xls except for paid subscriptions for example.
    – Panagiotis Kanavos
    Nov 8 at 17:19












  • Yes its correct that this file structure is old. But you are not right about possibility to parse it. There is open documentation about xls file structure (interoperability.blob.core.windows.net/files/MS-XLS/…). And current library i talk about in this topic can do the job, but it seems they didn't implement ColumnWidth property. AakashM right, i opened issue on GitHub.
    – Mr-Cas
    Nov 8 at 17:48










  • And only paid libraries provide good enough results, none of them as good as Excel itself. Just because the format is known doesn't mean a library can handel pivot tables, features stored as blobs, embedded objects. The contents of those fields depend on each version of Excel itself.
    – Panagiotis Kanavos
    Nov 8 at 17:54

















up vote
1
down vote

favorite












I know how to get RowHeight



using(var xls2003Stream = new MemoryStream(xlsBytes)) 
{
using(var reader = ExcelReaderFactory.CreateReader(xls2003Stream))
{
var height = reader.RowHeight;
...
}
}


but the question is - can I get the column width using the ExcelDataReader library?










share|improve this question




















  • 1




    ExcelDataReader is meant to read Excel data, not formatting. The reader doesn't know about rows or heights, it knows how to read the next row and get column values from that row. What are you trying to do? If you care about formatting you probably need a different library, like EPPlus
    – Panagiotis Kanavos
    Nov 8 at 14:36












  • Yes i've got concept of that library, but for me it looks a bit weird that they created property RowHeight and no ColumnWidth. Anyway, it would be great if you will suggest me library which can read Excel2003 format with .NET Core support. I didn't found one.
    – Mr-Cas
    Nov 8 at 17:11










  • xls was abandoned 12 years ago. The format used by Excel is xlsx, a zip package containing XML files. The only reliable way to handle the obsolete format is to install Excel. That's impossible for servers or third-party applications, which is part of the reason it was abanadoned. Google Sheets doesn't support xls except for paid subscriptions for example.
    – Panagiotis Kanavos
    Nov 8 at 17:19












  • Yes its correct that this file structure is old. But you are not right about possibility to parse it. There is open documentation about xls file structure (interoperability.blob.core.windows.net/files/MS-XLS/…). And current library i talk about in this topic can do the job, but it seems they didn't implement ColumnWidth property. AakashM right, i opened issue on GitHub.
    – Mr-Cas
    Nov 8 at 17:48










  • And only paid libraries provide good enough results, none of them as good as Excel itself. Just because the format is known doesn't mean a library can handel pivot tables, features stored as blobs, embedded objects. The contents of those fields depend on each version of Excel itself.
    – Panagiotis Kanavos
    Nov 8 at 17:54















up vote
1
down vote

favorite









up vote
1
down vote

favorite











I know how to get RowHeight



using(var xls2003Stream = new MemoryStream(xlsBytes)) 
{
using(var reader = ExcelReaderFactory.CreateReader(xls2003Stream))
{
var height = reader.RowHeight;
...
}
}


but the question is - can I get the column width using the ExcelDataReader library?










share|improve this question















I know how to get RowHeight



using(var xls2003Stream = new MemoryStream(xlsBytes)) 
{
using(var reader = ExcelReaderFactory.CreateReader(xls2003Stream))
{
var height = reader.RowHeight;
...
}
}


but the question is - can I get the column width using the ExcelDataReader library?







.net exceldatareader






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 8 at 14:32









AakashM

51.7k12123170




51.7k12123170










asked Nov 8 at 11:08









Mr-Cas

62




62








  • 1




    ExcelDataReader is meant to read Excel data, not formatting. The reader doesn't know about rows or heights, it knows how to read the next row and get column values from that row. What are you trying to do? If you care about formatting you probably need a different library, like EPPlus
    – Panagiotis Kanavos
    Nov 8 at 14:36












  • Yes i've got concept of that library, but for me it looks a bit weird that they created property RowHeight and no ColumnWidth. Anyway, it would be great if you will suggest me library which can read Excel2003 format with .NET Core support. I didn't found one.
    – Mr-Cas
    Nov 8 at 17:11










  • xls was abandoned 12 years ago. The format used by Excel is xlsx, a zip package containing XML files. The only reliable way to handle the obsolete format is to install Excel. That's impossible for servers or third-party applications, which is part of the reason it was abanadoned. Google Sheets doesn't support xls except for paid subscriptions for example.
    – Panagiotis Kanavos
    Nov 8 at 17:19












  • Yes its correct that this file structure is old. But you are not right about possibility to parse it. There is open documentation about xls file structure (interoperability.blob.core.windows.net/files/MS-XLS/…). And current library i talk about in this topic can do the job, but it seems they didn't implement ColumnWidth property. AakashM right, i opened issue on GitHub.
    – Mr-Cas
    Nov 8 at 17:48










  • And only paid libraries provide good enough results, none of them as good as Excel itself. Just because the format is known doesn't mean a library can handel pivot tables, features stored as blobs, embedded objects. The contents of those fields depend on each version of Excel itself.
    – Panagiotis Kanavos
    Nov 8 at 17:54
















  • 1




    ExcelDataReader is meant to read Excel data, not formatting. The reader doesn't know about rows or heights, it knows how to read the next row and get column values from that row. What are you trying to do? If you care about formatting you probably need a different library, like EPPlus
    – Panagiotis Kanavos
    Nov 8 at 14:36












  • Yes i've got concept of that library, but for me it looks a bit weird that they created property RowHeight and no ColumnWidth. Anyway, it would be great if you will suggest me library which can read Excel2003 format with .NET Core support. I didn't found one.
    – Mr-Cas
    Nov 8 at 17:11










  • xls was abandoned 12 years ago. The format used by Excel is xlsx, a zip package containing XML files. The only reliable way to handle the obsolete format is to install Excel. That's impossible for servers or third-party applications, which is part of the reason it was abanadoned. Google Sheets doesn't support xls except for paid subscriptions for example.
    – Panagiotis Kanavos
    Nov 8 at 17:19












  • Yes its correct that this file structure is old. But you are not right about possibility to parse it. There is open documentation about xls file structure (interoperability.blob.core.windows.net/files/MS-XLS/…). And current library i talk about in this topic can do the job, but it seems they didn't implement ColumnWidth property. AakashM right, i opened issue on GitHub.
    – Mr-Cas
    Nov 8 at 17:48










  • And only paid libraries provide good enough results, none of them as good as Excel itself. Just because the format is known doesn't mean a library can handel pivot tables, features stored as blobs, embedded objects. The contents of those fields depend on each version of Excel itself.
    – Panagiotis Kanavos
    Nov 8 at 17:54










1




1




ExcelDataReader is meant to read Excel data, not formatting. The reader doesn't know about rows or heights, it knows how to read the next row and get column values from that row. What are you trying to do? If you care about formatting you probably need a different library, like EPPlus
– Panagiotis Kanavos
Nov 8 at 14:36






ExcelDataReader is meant to read Excel data, not formatting. The reader doesn't know about rows or heights, it knows how to read the next row and get column values from that row. What are you trying to do? If you care about formatting you probably need a different library, like EPPlus
– Panagiotis Kanavos
Nov 8 at 14:36














Yes i've got concept of that library, but for me it looks a bit weird that they created property RowHeight and no ColumnWidth. Anyway, it would be great if you will suggest me library which can read Excel2003 format with .NET Core support. I didn't found one.
– Mr-Cas
Nov 8 at 17:11




Yes i've got concept of that library, but for me it looks a bit weird that they created property RowHeight and no ColumnWidth. Anyway, it would be great if you will suggest me library which can read Excel2003 format with .NET Core support. I didn't found one.
– Mr-Cas
Nov 8 at 17:11












xls was abandoned 12 years ago. The format used by Excel is xlsx, a zip package containing XML files. The only reliable way to handle the obsolete format is to install Excel. That's impossible for servers or third-party applications, which is part of the reason it was abanadoned. Google Sheets doesn't support xls except for paid subscriptions for example.
– Panagiotis Kanavos
Nov 8 at 17:19






xls was abandoned 12 years ago. The format used by Excel is xlsx, a zip package containing XML files. The only reliable way to handle the obsolete format is to install Excel. That's impossible for servers or third-party applications, which is part of the reason it was abanadoned. Google Sheets doesn't support xls except for paid subscriptions for example.
– Panagiotis Kanavos
Nov 8 at 17:19














Yes its correct that this file structure is old. But you are not right about possibility to parse it. There is open documentation about xls file structure (interoperability.blob.core.windows.net/files/MS-XLS/…). And current library i talk about in this topic can do the job, but it seems they didn't implement ColumnWidth property. AakashM right, i opened issue on GitHub.
– Mr-Cas
Nov 8 at 17:48




Yes its correct that this file structure is old. But you are not right about possibility to parse it. There is open documentation about xls file structure (interoperability.blob.core.windows.net/files/MS-XLS/…). And current library i talk about in this topic can do the job, but it seems they didn't implement ColumnWidth property. AakashM right, i opened issue on GitHub.
– Mr-Cas
Nov 8 at 17:48












And only paid libraries provide good enough results, none of them as good as Excel itself. Just because the format is known doesn't mean a library can handel pivot tables, features stored as blobs, embedded objects. The contents of those fields depend on each version of Excel itself.
– Panagiotis Kanavos
Nov 8 at 17:54






And only paid libraries provide good enough results, none of them as good as Excel itself. Just because the format is known doesn't mean a library can handel pivot tables, features stored as blobs, embedded objects. The contents of those fields depend on each version of Excel itself.
– Panagiotis Kanavos
Nov 8 at 17:54














2 Answers
2






active

oldest

votes

















up vote
0
down vote













Based on the fact that searching the library's repo for the word width doesn't show up anything useful, I'm going to say no it's not currently possible. But then, from the issue you opened, you knew that right? :)






share|improve this answer




























    up vote
    0
    down vote



    accepted










    Issue opened on GitHub as they just didn't implement this property.
    https://github.com/ExcelDataReader/ExcelDataReader/issues/365






    share|improve this answer





















      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














       

      draft saved


      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53206528%2fhow-to-get-column-width-using-exceldatareader-library%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      0
      down vote













      Based on the fact that searching the library's repo for the word width doesn't show up anything useful, I'm going to say no it's not currently possible. But then, from the issue you opened, you knew that right? :)






      share|improve this answer

























        up vote
        0
        down vote













        Based on the fact that searching the library's repo for the word width doesn't show up anything useful, I'm going to say no it's not currently possible. But then, from the issue you opened, you knew that right? :)






        share|improve this answer























          up vote
          0
          down vote










          up vote
          0
          down vote









          Based on the fact that searching the library's repo for the word width doesn't show up anything useful, I'm going to say no it's not currently possible. But then, from the issue you opened, you knew that right? :)






          share|improve this answer












          Based on the fact that searching the library's repo for the word width doesn't show up anything useful, I'm going to say no it's not currently possible. But then, from the issue you opened, you knew that right? :)







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 8 at 14:46









          AakashM

          51.7k12123170




          51.7k12123170
























              up vote
              0
              down vote



              accepted










              Issue opened on GitHub as they just didn't implement this property.
              https://github.com/ExcelDataReader/ExcelDataReader/issues/365






              share|improve this answer

























                up vote
                0
                down vote



                accepted










                Issue opened on GitHub as they just didn't implement this property.
                https://github.com/ExcelDataReader/ExcelDataReader/issues/365






                share|improve this answer























                  up vote
                  0
                  down vote



                  accepted







                  up vote
                  0
                  down vote



                  accepted






                  Issue opened on GitHub as they just didn't implement this property.
                  https://github.com/ExcelDataReader/ExcelDataReader/issues/365






                  share|improve this answer












                  Issue opened on GitHub as they just didn't implement this property.
                  https://github.com/ExcelDataReader/ExcelDataReader/issues/365







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 8 at 17:51









                  Mr-Cas

                  62




                  62






























                       

                      draft saved


                      draft discarded



















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53206528%2fhow-to-get-column-width-using-exceldatareader-library%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Schultheiß

                      Verwaltungsgliederung Dänemarks

                      Liste der Kulturdenkmale in Wilsdruff