Questions tagged [csv]
The CSV tag concerns text-based files containing tabular material using commas as a separator.
292
questions
0
votes
1answer
738 views
Graph from csv table (col sep=comma) with pgfplotsinvokeforeach
I have many huge csv files and need a easy way to plot all of them without defining headers etc. every time.
Therefore I found this: https://tex.stackexchange.com/a/24023/95657
That is exactly what ...
3
votes
1answer
583 views
Highlight maximum values for each row in large csv
I am loading a rather large .csv file (>100 rows) that I need to print in longtable format and highlight the maximum value in each row. I found this thread Highlighting Extremal Values in Table which ...
2
votes
1answer
273 views
raster plot with tikz in latex from csv file
I am trying to plot neuron's spikes which are stored in a csv file the following way:
time, neuron1, neuron2, neuron3,...
1,1,0,1,...
2,1,0,0,...
3,0,0,1,...
and so on...
Therefore the data ...
1
vote
0answers
87 views
Extract one specific value from table/csv to draw an horizontal line
I need to add horizontal lines (asymptotes) to a plot made from a csv file, with the y-axis value taken from this last. I found an example to draw the horizontal lines
\addplot [thick,black]
table[x=...
2
votes
1answer
471 views
How can I generate a big tabular out of a csv File?
I have a csv File with 400 lines and 3 columns and I want to generate one Table over more site (I guess there will be 3 pages).
In addition there should be 4 columns of table at one site like this:
...
2
votes
1answer
134 views
Expansion of siunitx glossary entrys using a csv file
I'm try to create a custom latex class based on scrbook. I make heavy use of glossaries for my math symbols, for which pdftool tips are created showing the description and units when a mouse pointer ...
2
votes
2answers
225 views
insert table generated by csvsimple package into another tex document not using that package
I'm not sure if the title describes the question clearly.
I have a latex document that uses the csvsimple package to read some columns from a large datafile and make a nice table. It works fine, but ...
0
votes
1answer
147 views
cite inside a csv file
I am trying to create a table from a csv file that has a citation column. Here is a sample from the csv file:
id, ref
1, \cite{ref1}
2, \cite{ref2}
when I use:
\csvreader[
respect all,
...
1
vote
1answer
81 views
Last column does not show information when using csvreader
I am trying to show a table with two rows and 13 columns, through CSV and csvreader.
As you can see on the contents, there are two X's in the last column of the two rows. However, they are not shown ...
0
votes
0answers
96 views
URL wrapping (line breaking) in csvreader tables
I am trying to create a table by reading a CSV file with 'csvreader'. The CSV file contains one URL per row, some of the URLs are too long, so the aspect is awful, since some of the URLs invades the ...
2
votes
1answer
103 views
How to add symbols from csv file
Is there any way to read symbols from a CSV file using pgfplotstable.
\documentclass[8pt]{article}
\usepackage[english]{babel}
\usepackage{pgfplots, pgfplotstable}
\usepackage{filecontents}
\begin{...
1
vote
1answer
337 views
How to use a semicolon separator with csvsimple together with babel (french language)?
1) Semicolon ; separator and babel
Using the package csvsimple, I found that I can use a semicolon ; separator only if the babel package is not loaded:
\documentclass[varwidth,margin=0.5cm]{...
3
votes
2answers
176 views
CSV file and QR codes
I have a .csv file with some URLs.
First I want to store each URL in a variable.
Second I want to print the variables in QR codes.
What's the easiest way to do this?
MWE
\documentclass{article}
\...
1
vote
1answer
1k views
csvreader longtable caption repeated on every page
I am using csvreader with longtable and I added a caption in table head below is my code:
\csvreader[
longtable=ccc,
table head=\caption{Caption goes here.
}\label{tab:sometab} \\
\toprule\...
1
vote
1answer
32 views
Glossaries always gives last entry of csv-list when processed with datatool
Ok, I am clearly missing something but I cannot figure out what is wrong.
All is fine concerning the \gls{}-entries, but in \printglossary I only get the last entry of the .csv-list.
\documentclass{...
0
votes
0answers
75 views
longtable from csv how to bold specific rows?
I am creating long table from csv file. I want specific rows to be in bold font. how to do it ? Csv file is huge.
I have tried \textbf{} as it works in normal table from csv file.
My code is ..
\...
4
votes
1answer
194 views
csvreader creates empty table, despite no compile error
I have a CSV file composed as shown below (I reported only a small part of it as it is very long). The actual separator I chose to use is '|' (pipe), as the file content might also include comma. Each ...
4
votes
5answers
568 views
\newcommand and CSV file
I have a CSV file which looks like this
testa, 123
testb, 456
testc, 789
How can process the CSV file to get the following result?
\newcommand{\testa}{123}
\newcommand{\testb}{456}
\newcommand{\...
1
vote
2answers
973 views
Cannot import csv file data to table in latex using csvsimple
I don't know why the data rows not shows up. Only the header, here is my csv file:
method,name,error,occurences
socket,socket,"ConnectionResetError(54, 'Connection reset by peer')",12
socket,socket,"...
5
votes
2answers
738 views
Rendering CSV data in tables which do not fit in paper width
I have to generate a number of tables from CSV data which span a
couple of hundred pages or more. So, I need some kind of
automation for this.
Please note the following salient points:
The data has ...
1
vote
1answer
56 views
How to get related information from a database?
Hello friends I am not able to get or link the content of Core-1 to look up table content of Core-1 is ENGL when i used \coreOne i am getting output as ENGL, so what will happen if i use \coreOne (i....
2
votes
1answer
321 views
csvsimple row counter processing
I am trying to list data from a csv file using csvsimple and to add automatic hyperlinks to related sections.
Issue
When working with a file with a header (but using the no head option to define a ...
3
votes
1answer
902 views
Can't colour my scatter plot according to values of a csv file
I am having issues trying to build a very simple scatter plot. The csv is organized as follows:
0.09298303885566861,1976.677756339018,1.360252917788105
0.05630059591218889,3608.903320218602,-12....
2
votes
1answer
408 views
Import CSV file generated from Excel To LaTeX with Datatool with accent
I'm trying to import a .CSV file generated with excel that contais special characters as á, é, í, ó, ú.
I'm using \DTLloadrawdb, but these characters still don't show.
What is the magic trick to do ...
1
vote
0answers
396 views
Package datatool Error: Can't assign \company : there is no key `*' in data base `*'
Hy, i'm having problem with the \DTLforeach in my table. LaTeX returns the following error:
Package datatool Error: Can't assign \company : there is no key Company' in data baseprodutosAloe'. ...\...
2
votes
1answer
380 views
Labeling points imported from csv
I have a csv file consisting of two columns corresponding to the x and y coordinates of a point cloud. Since it is possible to label a point in a tikzpicture environment by
\coordinate (1) at (0,0); #...
2
votes
1answer
372 views
Reading quoted csv
I would like to read in data from a CSV file into a plot. Unfortunately, the data contains commas itself:
Name, Description, Data
hello, "hello, world", 1
Note that the data is quoted using ...
1
vote
0answers
438 views
Plot directly from .csv file [closed]
\begin{tikzpicture}
\begin{axis}[
title=Stress vs. Strain,
xlabel={Strain $\Delta$ (\si{\milli\meter})},
ylabel={Load $F$ (\si{\newton})},
xmin=-0.30,
ymin=0,
%grid=major,
...
1
vote
0answers
674 views
Python array to txt or csv to latex [closed]
I'm new at Latex and I have a problem, I have an array in Python and I want to paste that array as a matrix in Latex in a simple way.
In Python I have:
np.savetxt("matrix.csv", matrizfake, delimiter='...
4
votes
1answer
301 views
DTLgetvalueforkey works, but DTLfetch doesn't
In the following example \DTLgetvalueforkey retrieves the information without problem, while \DTLfetch fails:
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{data.csv}
...
2
votes
1answer
146 views
PGFPlots - messed up data from csv file
I'm trying to plot some data that I aquired form a sensor. However, the plot looks very messed up an I'm not sure why. It appears as if the data on the x axis is not read correctly.
MWE:
\...
3
votes
1answer
221 views
loop for table generation with pgfplotstable
I am using pgfplotstable to enter my CSV tables into LaTeX. The issue is that I am using two lines as the header, in the first line introducing my variables and second line their units.
The following ...
3
votes
2answers
277 views
How do I get datatool to play nicely with utf8 inputenc and non-ASCII in the incoming CSV?
If I try to compile the following LaTeX file:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{datatool}
\begin{document}
\tableofcontents
\appendix
\section{Bill of Materials}
\...
1
vote
0answers
251 views
CSV Reader does not compile special characters
I am creating tables from a csv file by using "csvsimple" package. The "autotabular" option is included, so that I don't have to manually count the number of cells and manually set the cell alignment. ...
0
votes
1answer
438 views
Table from csv file with two header rows [duplicate]
I have multiple csv files to read and create a table with one or two headerlines. (parameters/units) I would like to use two header lines from this files using \pgfplotstabletypeset. Can anyone help ...
4
votes
1answer
233 views
How to call specific lines of data in a CSV in ConTeXt?
I have a CSV file, using "@" as the delimiter, containing data such as this:
Code @ Title @ Page @ Tags @ File
001 @ Buying Tips @ 1 @ seafood, fish, ...
0
votes
1answer
948 views
display a csv file in LaTeX [closed]
How can I link a csv file, and display the data in separate columns ?
\documentclass{article}
\usepackage{makeidx}
\usepackage{datatool}
\DTUoaddb[keys=c1,c2,c3]{ctext}{csvtext.csv}
\begin{document}
\...
5
votes
3answers
261 views
How to generate key value macro from csv file?
I have a CSV file with key-value pairs, and I want to be able to read the file into latex, and generate macros to access the values. Here is my current attempt with datatool:
\documentclass{article}
...
6
votes
1answer
403 views
Tikz Wheelchart - How do I link a CSV to this graph?
I am trying to connect a CSV file to a wheelchart of the tikzpicture package. The image below looks fine, the only issue is that currently the data entries are hard coded. In the code below you can ...
2
votes
1answer
73 views
Help with longtable renders extra field
So I have a problem because my longtable seems always render one extra field in my table.
Depending on where I put my \ it renders after it goes through the csv or before.
My code is:
\documentclass{...
3
votes
1answer
55 views
csvloop bug with the word “long”?
I'm experimenting some issues with the csvloop using the package csvsimple. I need help determining if it's a bug with the package, or something I can fix myself.
The word "long" is showing up in my ...
1
vote
2answers
327 views
CSV groupplot expansion within foreach loop
I want to make a groupplot of a number of columns from a CSV file. The CSV file looks like this:
a,b,x,y
1,2,3,4
5,6,8,1
9,2,4,5
5,5,1,9
Therefore I made a package that uses the code below to plot ...
1
vote
1answer
194 views
3D Surf/Mesh Plot from a Single Line in csv File? Pgfplots preferably
I have done a range of experiments, each using 9 sensors. The sensors are physically aligned in 3 by 3, and I would like to also show the data in a mesh or surface plot like this. However, I get the ...
2
votes
1answer
98 views
PGFplot plot y over x where z=bar (comparable to SQL WHERE clause)
I am using TexLive XuaLatex with PGFplots 1.13 to plot data. I have a table like this:
x , y , z
0 , 0 , 0
0 , 0 , 1
1 , 1 , 0
1 , 1 , 1
2 , 2 , 0
2 , 4 , 1
3 , 3 , 0
3 , 9 , ...
4
votes
3answers
847 views
Creating string array from csv file
I would like to create some name badges using a loop. I have a spreadsheet with names and affiliations that I save in names.csv file as follows
"Name1","Surname1","Affiliation1",
"Name2","Surname2","...
1
vote
1answer
365 views
Missing \endgroup in csv longtable
I am trying to read in a very long csv file to a longtable, but I am getting a missing \endgroup inserted error when compiling. I cannot figure out what is missing.
\documentclass{standalone}
\...
6
votes
1answer
1k views
Adjust decimals on table from csv
My problem is that I'm importing some data from a csv and generating a table.
The table is good, but I need the numbers with 4 decimals. I've generated the table with this code (probably it is not ...
2
votes
0answers
398 views
Error when importing UTF-8 encoded csv file containing “æ,ø,å” with datatool [duplicate]
I am trying to import a UTF-8 encoded csv file into a tabularx environment to sort the table in ascending order with respect to the first column. When compiling I get the error: Package inputenc Error:...
1
vote
2answers
2k views
how to import CSV table with header containing spaces
The header column names in my CSV contain spaces. Is there a way to still import it using csvsimple or maybe some other package? That way I would be able to specify data in CSV, import it and render ...
1
vote
0answers
331 views
xticklabels from table not working [duplicate]
The content
\documentclass[margin=1cm]{standalone}
\usepackage{filecontents}
\usepackage{pgfplots}
\begin{filecontents}{dummy.txt}
category,amountTotal
excellent,0
good,8
neutral,2
...