bbgunmaster / jquerycsvtotable Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/jquerycsvtotable
Automatically exported from code.google.com/p/jquerycsvtotable
What steps will reproduce the problem?
1. Call CSVtoTable on a CSV with \r\n endings throughout, with each field
quoted ("). The CSV must have more than 1 row.
What is the expected output? What do you see instead?
Expected: outer quotes are stripped for all columns
But I see: outer quotes are not stripped for the last column in the table.
What version of the product are you using? On what operating system?
- Windows 7 64 bit / Chrome 38.0.2125.111
Please provide any additional information below.
There is clearly attempted support to strip out \r characters, but it appears
to be buggy. It currently has:
var lines = data.replace('\r','').split('\n');
Which only does a single replacement. It should be global:
var lines = data.replace(/\r/g,'').split('\n');
This is compounded by the following further bug in this line in the splitCSV
function:
if (thisCSV[x].replace(/"\s+$/, '"').charAt(thisCSV[x].length - 1) == '"') {
This "tidies" the string (stripping trailing whitespace after a terminating
quote), then checks if the last character is a string. However, it uses
thisCSV[x].length when it should probably use the length of the new, tidied
string instead:
if (thisCSV[x].replace(/"\s+$/, '"').slice(-1) == '"') {
NB I'm not a javascript programmer, no idea if the slice function is widely
available. You could use a temporary variable and charAt instead.
Fixing either of these apparent bugs would address the problem. I don't know
the code well enough to know which, if either, is safe to do. If it's safe, it
seems wise to fix both.
Original issue reported on code.google.com by [email protected]
on 5 Jan 2015 at 6:01
I Just attach csv and i have "biñan" in my data
the letter "ñ" is in our alphabet the error goes directly on the line that has
that letter the error was 'error on line 57: Item count (6) does not match
header count (7)'
This is not browser compatibility issue cos i have tried it on firefox, ie, and
google chrome.
Original issue reported on code.google.com by [email protected]
on 11 Jul 2014 at 5:03
I have a cvs with duplicate values. It throws an error. Can you help?
Original issue reported on code.google.com by [email protected]
on 14 Feb 2014 at 5:49
What steps will reproduce the problem?
1. Import a CSV file with HTML special characters, eg. <>
What is the expected output? What do you see instead?
Expect to see the actual CSV value displayed in the browser.
Text such as <hi> will not be displayed.
Original issue reported on code.google.com by [email protected]
on 7 Jul 2011 at 3:27
Hi,
the function works properly in my local end, but when I put it on my live site
somehow it can't process the csv.
this appears
XMLHttpRequest cannot load data:;base64,RW1h....
requests are only supported for HTTP.
I have tried it on chrome,firefox,safari same response i got.
from what I observe my local runs in http: while my live is https:
Original issue reported on code.google.com by [email protected]
on 9 Jul 2014 at 5:32
Hello,
I have a CSV file that looks like this:
"Volume","Description","Size","Used"
"lbu_vc01_vfi01_vol00","vFiler root","10","0"
"lbu_vc01_vfi01_vol01","Infrastructure VMs","1410","66"
"lbu_vc01_vfi01_vol02","VMware cluster","20","0"
"lbu_vc02_vfi01_vol00","vFiler root","10","0"
The table that is produced by CSVTable looks like this:
<thead class=""><tr class=""><th class="">Volume</th><th
class="">Description</th><th class="">Size</th><th
class="">Used</th></tr></thead><tbody class=""><tr class=" odd"><td
class="">lbu_vc01_vfi01_vol00</td><td class="">vFiler root</td><td
class="">10</td><td class="">"0"
</td></tr><tr class=" even"><td class="">lbu_vc01_vfi01_vol01</td><td
class="">Infrastructure VMs</td><td class="">1410</td><td class="">"66"
</td></tr><tr class=" odd"><td class="">lbu_vc01_vfi01_vol02</td><td
class="">VMware cluster</td><td class="">20</td><td class="">"0"
</td></tr><tr class=" even"><td class="">lbu_vc02_vfi01_vol00</td><td
class="">vFiler root</td><td class="">10</td><td class="">"0"
As you can see the numbers in the final column are surrounded by quotation
marks, whereas those in the preceding column are not. It looks like it is
treating the final column as text rather than numbers.
What version of the product are you using? On what operating system?
Firefox 16.0 on Windows 7
Thanks for any help you can offer.
Regards,
Mark
Original issue reported on code.google.com by [email protected]
on 18 Dec 2012 at 10:20
Hi, is there a way to format the table so that the text of the first column is
aligned left and all other columns centered?
Also, how can I assign different width for the first column?
Thanks ;)
Original issue reported on code.google.com by [email protected]
on 19 Sep 2012 at 9:29
Does this support passing CSV data straight from javascript ?
Original issue reported on code.google.com by [email protected]
on 3 Jan 2013 at 9:22
When using DataTables (www.datatables.net) to process the table, the different
classes used for <tr> tags makes the alternating row colors unreliable.
Removing oddOrEven, as below fixes this. Allowing the user to set options
trClassOdd and trClassEven to the same value is another possible fix.
Line 129:
- (printedLines % 2) ? oddOrEven = 'odd' : oddOrEven = 'even';
- tableHTML += '<tr class="' + options.trClass + ' ' + oddOrEven + '">';
+ tableHTML += '<tr class="' + options.trClass + ' ">';
Original issue reported on code.google.com by [email protected]
on 19 Mar 2014 at 10:13
What steps will reproduce the problem?
1. Use example of bind the loadComplete trigger to tablesorter
2. Load the example in Chrome Version 31.0.1650.63
3. Note that tablesorter actually acted on "Loading CSV data..."
What is the expected output? What do you see instead?
Expected the table to be sorted.
What version of the product are you using? On what operating system?
version 0.9 (2010-06-22) on Chrome Version 31
Please provide any additional information below.
Changing obj.fadeOut timing from 500ms to 0ms seems to fix the problem.
Original issue reported on code.google.com by [email protected]
on 9 Jan 2014 at 6:26
Load a csv from a local file (not http content-type set)
Works with Chrome (with --allow-file-access-from-files)
Firefox reports "sytax error" on the .csv file
Fix:
add "text" as the last argument to $.get() to prevent Firefox from parsing the
file,line 150
--- jquery.csvToTable.js 2012-02-16 10:48:18.000000000 +0100
+++ jquery.csvToTable.js.orig 2012-02-16 10:48:11.000000000 +0100
@@ -150 +150 @@
- }, "text");
+ });
Original issue reported on code.google.com by [email protected]
on 16 Feb 2012 at 9:49
What steps will reproduce the problem?
1. this is working in IE browser only
2.
3.
What is the expected output? What do you see instead?
need to work all browsers
What version of the product are you using? On what operating system?
window 7
Please provide any additional information below.
I have attached error page sample
Original issue reported on code.google.com by [email protected]
on 24 Jul 2013 at 9:35
Attachments:
I have an issue for the UTF-8 characters.
I norwegian letters: æøå are showing as: �
How can i fix-it?
Original issue reported on code.google.com by [email protected]
on 27 Jan 2015 at 8:11
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.