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 9197245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:01:39+00:00 2026-06-17T22:01:39+00:00

I Have a CSV file stored locally on a Web server which gets added

  • 0

I Have a CSV file stored locally on a Web server which gets added to periodically with numeric and string data all of unequal lengths. I need a way to add up all of the rows byte values from each read, The Byte count is required because of the stateless nature of reading the file in from the server. I need to maintain the next read start point! So far I can get the byte value counted for each row,

            function renderData( data )
            {
                var dataRows = data.split( "\n" );
                var numrows = dataRows.length;
                var table = document.createElement("Table");
                table.border = 1;
                var nextindex = 0;
                for( i = 0; i < numrows; i++ )
                {
                    var rowlength = dataRows[i].length;
                    var totalBytes = numrows += rowlength;
                    currentindex = nextindex;
                    nextindex = totalBytes;
                    document.write(" Row "+i+" is " + rowlength + " bytes long ");
                    document.write(" next index starts " + totalBytes + " bytes in ");
                    var tableRow = table.insertRow(i);
                    var dataCells = dataRows[i].split(",");
                    for( j = 0; j <dataCells.length; j++ )
                    {
                        var tableCell= tableRow.insertCell(j);      
                        tableCell.innerHTML = dataCells[j];
                    }
                    executeSql( "INSERT INTO CAN ("", "", "", etc) values(?,?,?,)", dataCells );

                }
                document.body.appendChild( table );
            } 
  • 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-17T22:01:40+00:00Added an answer on June 17, 2026 at 10:01 pm

    How about instead of doing var totalbytes = numrows*nextindex, make totalbytes a global variable and do totalbytes += rowlength; each iteration ?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have application which exports data in csv file which is stored in Document's
I have data stored in a csv file that looks like this: Date,BLOCK,,Wood,Miscellaneous,,Totals,MO Saturday,4055-RU,4055-AR,4091,1139,1158,,100
I have a fairly large table (~5 MB csv file) stored on our server
I have 30 runs of data, each stored in a separate CSV file, runi.csv,
I have made a java application that stores data from a .csv file to
Little Background: I have csv file which has lots of rows and each row
I have a CSV file supplied from a client which has to be parsed
I have a small function that creates a .csv file from strings stored in
I have csv files stored on my server. If I enter the right key
On a http website, I have loads of csv files stored which chronological naming

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.