Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8925733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:46:43+00:00 2026-06-15T07:46:43+00:00

After trying few packages with git hub, and trying to parse/process this quite a

  • 0

After trying few packages with git hub, and trying to parse/process this quite a large excel document.
Each one of methods I was trying throw exception on out of memory.

I was google ing some more and found this GNU Library named koogra which seems to be only one I could see fit for the job, couldn’t bother too much and continue on searching as I am running out of time for this part of the project .

The code I have got by now is working pass the part of the “out of memory” issue,

so only thing left is how do I properly parse an Excel Document so it will be possible to extract say a kind of dictionary collection key is one column and value is another.

this is the file in question

this is the code i have so far

var path = Path.Combine(Environment.CurrentDirectory, "tst.xlsx");
Net.SourceForge.Koogra.Excel2007.Workbook xcel = new Net.SourceForge.Koogra.Excel2007.Workbook(path);
var ss = xcel.GetWorksheets();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:46:44+00:00Added an answer on June 15, 2026 at 7:46 am

    found it by some more …. google ing…
    first row for usage on 2007 (xlsx)

    second row is for xls version

            Net.SourceForge.Koogra.IWorkbook genericWB = Net.SourceForge.Koogra.WorkbookFactory.GetExcel2007Reader("tst.xlsx");
    
            //genericWB = Net.SourceForge.Koogra.WorkbookFactory.GetExcelBIFFReader("some.xls");
    
            Net.SourceForge.Koogra.IWorksheet genericWS = genericWB.Worksheets.GetWorksheetByIndex(0);
    
            for (uint r = genericWS.FirstRow; r <= genericWS.LastRow; ++r)
            {
                Net.SourceForge.Koogra.IRow row = genericWS.Rows.GetRow(r);
    
                for (uint c = genericWS.FirstCol; c <= genericWS.LastCol; ++c)
                {
                    // raw value
                    Console.WriteLine(row.GetCell(c).Value);
    
                    // formatted value
                    Console.WriteLine(row.GetCell(c).GetFormattedValue());
                }
            }
    

    i hope that i helped anyone else out there that encountered same “out of memory” issue … ‘
    enjoy

    a small update to the code above

    OK.. I Have played with this a little , so as far as it is related to the content of the file
    the chart is ranked based on Unique IP and the current code is

                //place source file within your current:
                //project directory\bin\debug and you should find extracted file next to the source file 
                var pathtoRead = Path.Combine(Environment.CurrentDirectory, "tst.xlsx");
                var pathtoWrite = Path.Combine(Environment.CurrentDirectory, "tst.txt");
    
                Net.SourceForge.Koogra.IWorkbook genericWB = Net.SourceForge.Koogra.WorkbookFactory.GetExcel2007Reader(pathtoRead);
                Net.SourceForge.Koogra.IWorksheet genericWS = genericWB.Worksheets.GetWorksheetByIndex(0);
                StringBuilder SbXls = new StringBuilder();
                for (uint r = genericWS.FirstRow; r <= genericWS.LastRow; ++r)
                {
                    Net.SourceForge.Koogra.IRow row = genericWS.Rows.GetRow(r);
                    string LineEnding = string.Empty;
                    for (uint ColCount = genericWS.FirstCol; ColCount <= genericWS.LastCol; ++ColCount)
                    {
    
                        var formated = row.GetCell(ColCount).GetFormattedValue();
                        if (ColCount == 1)
                            LineEnding = Environment.NewLine;
                        else if (ColCount == 0)
                            LineEnding = "\t";
                        if (ColCount > 1 == false)
                            SbXls.Append(string.Concat(formated, LineEnding));
                    }
                }
                File.WriteAllText(pathtoWrite, SbXls.ToString());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

[FIXED] After trying quite a few different solutions I finally got one to work.
I asked this question earlier today. After trying out suggestions from a few members,
After few weeks break, I'm trying to expand and extend my knowlege of templates
After trying this simple console input with 5, the result is shown as 53
After a few hours of trying I still cannot figure out how to incorporate
I just finally after trying many time over the past few years, got my
I'm new to java and web apps and after trying out a few things
After trying to read various articles on sending emails with attachments in PHP (I
After trying to figure how to have an effective word counter of a string,
After trying to make a while(bool) loop and it failing because I couldn't see

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.