Questions tagged [csv]
The CSV tag concerns text-based files containing tabular material using commas as a separator.
348
questions
0
votes
0
answers
11
views
Reset Title and Author's block with csvsimple package
I use csvsimple to export data and want to create multiple pages with 'Title and Author blocks. I read this and this and am wondering if there is any simple way to address this?
\documentclass[...
1
vote
1
answer
33
views
Issue with rules when display csv file in a tabular
I'm trying to display values from a csv file inside a tabular. To do so, I'm using the macro \csvreader. I would like thr tabulat to like this way :
with a toprule, the head of columns, a midrule, ...
0
votes
0
answers
20
views
How can I read an excell csv file with colored cells into a tabular or table and display the color formatting?
This is my code for reading the csv files into a tabular, but it does not keep the color formatting:
\csvreader[tabular={|c|c|r|c|c|c|c|c|c|},
before reading = \begin{adjustbox}{width=\columnwidth},
...
1
vote
1
answer
57
views
Connecting points with coordinates from columns in a csv file
I have a csv file containing four columns x1, y1, x2 and y2. I need to draw line segments connecting the points (x1,y1) and (x2,y2) for each row of the table using \addplot. In the following code, ...
0
votes
1
answer
69
views
How to auto replace string pattern in header CSV cells with pgfplotstable?
In the following csv file example, I want to automatically replace a string pattern in all headers cells when importing with pgfplotstable:
\begin{filecontents*}{sample.csv}
parameter,cubic ...
0
votes
1
answer
95
views
How to randomly select and plot a csv file from a folder
I have data1.csv, data2.csv, and data3.csv in a folder.
I use pythontex to randomly select a number from 1 to 3.
\begin{pycode}
list = random.sample(range(1, 3), 3)
select = list[0]
\end{pycode}
Then ...
0
votes
1
answer
58
views
How to read values interms of milli(m), femto(f), micro(u) into float values
I have a .csv file, which contains values interms of milli(m), femto(f) and micro(u)etc. which I want to process it as float value inside pgfmathparse
\begin{filecontents*}{mycsv.csv}
Device, betaeff, ...
0
votes
1
answer
49
views
exporting a specific row from CSV using csvsimple
What is the best way to obtain a specific row (or a subset of row) when I use csvsimple?
⧵csvreader[head to column names]{filename.csv}{}{}
For example, I would like to get only row three from the ...
0
votes
0
answers
31
views
Export text from CSV or Excel to Latex document
Similar to this creating multiple generic letters from pulling info from an excel/csv file, how can I create multiple files from LaTeX without using r?
I do not have any issues with running LaTeX code ...
0
votes
0
answers
50
views
How to correctly import csv files as table and split it on two page?
My goal is to import a .csv file as a table into my thesis and split it on two pages. I want also to skip the header line of the table to set the header in Overleaf.
Here is my .csv file (I need to ...
2
votes
2
answers
248
views
How to read a large .csv file as table with bookstyle?
I need to insert large tables in the appendix of my MSc thesis and I want to read the data from .csv files without fill the .tex file where I write.
I produce the tables with the help of ...
0
votes
0
answers
44
views
Is there a way to make \DTLloaddb load not from external files? [duplicate]
The journal has a rule that forbids loading external files and the entire tex file must be self-contained in a single .tex file. Therefore all \DTLloaddb{aaa.csv} must be replaced. Is there a way to ...
1
vote
1
answer
34
views
Data from file when variable number of data
I am using the datatool package in order to get data from a csv to LaTeX pdf pages:
\documentclass{article}
\usepackage{datatool}
\begin{document}
\DTLloaddb{data}{students.csv}
\DTLforeach{data}
{\...
0
votes
1
answer
73
views
Read CSV as crosstab/pivot table
I've got a table that looks like this:
(Note: This table was generated in winword by my predecessor, so I don't have a MWE of it. My attempts to do so have failed, as it's apparently not so simple to ...
0
votes
1
answer
25
views
howto obtain a striped table with csvloop?
Is this possible with csvloop command to change the row colors in order to obtain a striped longtable?
Something equivalent to late after line=\csvifoddrow{\\\rowcolor{white}{\\\rowcolor{gray!20}}, ...
-2
votes
1
answer
50
views
using csvsimple inside a pgfgantt diagram?
Is there any possibility to use some data contained in a csv file to create milestone or bar inside a pgfgantt diagram ? And, if yes, how to do so ? Is this possible with csvsimple ? Is it possible to ...
0
votes
0
answers
20
views
Contents imported from csv file goes beyond the page below
I want to create a one-word Q&A document. I imported the contents from a .csv file which has 104 rows, the contents go below the page and not to the next page. How do I rectify it?
\documentclass[...
5
votes
1
answer
100
views
Using \def in csv range
I would like to use a predefined list of numbers in the csvsimple-l3 range option.
The MWE will explain better:
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{csvsimple-l3}
\...
0
votes
2
answers
61
views
automating vector math problem creation using csv data source
I'm a teacher, and I'm looking to automate some homework problem creation with vector algebra. I would like to use a csv file (which I can pre-process for input to tex) with the format:
"question....
1
vote
1
answer
57
views
Get vector from array .csv file
I hope you can help me. I want to create a variable with name 'x' with the values of the column with header 'x' of the array .csv file called 'data' (please see below). Could you help me do it?
.csv ...
0
votes
0
answers
36
views
csvsimple: Recreate \csvautotabular from \csvreader
The package csvsimple contains the command \csvautotabular, which reads a csv file with an arbitrary number of columns and creates a table. This command is considered basic, and it is recommended in ...
1
vote
1
answer
69
views
Using a CSV File to Drive Custom Macro
Background
I am trying to figure out why the attached MWE is not working. My custom macro reqUser works correctly when using the xstring both inside and outside of the csvsimple environment. The expl3 ...
0
votes
1
answer
190
views
Pass tabular arguments from \newcommand
So I asked this question yesterday but I realized I didn't do a good job of explaining it. I basically need to read different csv files with different numbers of columns and I need to build a command ...
0
votes
2
answers
77
views
Transpose and make table with small text in corner + big text
Ok, this is what I want to make:
But I'm struggling with understanding how to make this from an external CSV file. I have this approach because the book will be driven by external files which is ...
1
vote
1
answer
57
views
Draw a piecewise constant graph from csv
I have the following csv file:
1,36
2,22
3,13
4,8
5,7
6,2
7,1
8,7
9,12
10,5
11,6
12,2
13,7
14,4
15,4
16,1
17,2
18,1
19,1
20,2
21,2
22,1
23,1
24,1
25,1
26,1
27,2
28,0
29,0
30,0
31,0
32,1
33,0
34,0
35,0
...
0
votes
0
answers
37
views
I can't seem to get anything to import a csv at all
I have a rather large .csv that I would rather not type by hand into LaTeX, and am trying to use the csvsimple package to import it. The csv is 51 rows long, with the first few looking like the ...
4
votes
1
answer
342
views
How to read a csv file row by row and create a table?
I have a problem reading my rows from the .csv database. Separated by commas every key.
So, here is my .csv:
id,term,description
1,"system","name"
2,"syst2","...
0
votes
1
answer
343
views
How to correctly parse a CSV file row-by-row with different number of commas/columns from each row to another?
Following up this answer, with this csv file
\begin{filecontents*}[overwrite]{mydata.csv}
TeMaxPartLoad,163.0576,,,,
MaxSpeedTR,1065.9,,,,,
coeffs, 3, 5, 9 , 8, 6 ,
\end{filecontents*}
I ...
1
vote
1
answer
30
views
pgfplots generates extra x steps from csv
I try to load data from a csv and set the x ticks to years but for some reason, pfgplots creates intermediate 0.5 years with no corresponding y data points.
\documentclass[12pt]{article} % use larger ...
1
vote
1
answer
29
views
How to filter case-insensitive in csvloop
I have a command like this:
\newcommand{\contactdetails}[1]{%
\csvloop{%
file={authors.csv},%
filter equal={#1}{\name},%
command=\printcontact,%
head=true,%
...
3
votes
1
answer
195
views
LaTeX 3D Plot from csv
I have a lot of csv-files with this format:
-,x0,x1,x2,x3,x4
y0,z00,z10,z20,z30,z40
y1,z01,z11,z21,z31,z41
y2,z02,z12,z22,z32,z42
I want to make a 3D Plot with LaTeX. Unfortunately, I was not able to ...
0
votes
1
answer
71
views
Plotting non nummerical data from csv file using pgfplots
so I'm trying to plot a csv file using pgfplots. The csv file looks like this but with more data:
Here is the download link for the csv: https://datawrapper.dwcdn.net/NDCZf/4/
I tried using the code ...
0
votes
1
answer
70
views
Rotating csvautotabular
I'm trying to include a table from an external data document which I have as a .csv file. I'm using
\begin{sidewaystable}
\begin{table} [H]
\csvautotabular{nameofcsvfile.csv}
\end{table}
\...
2
votes
1
answer
301
views
Use CSV to create documents
I have a CSV file like this
Name, Number
Apple, 5
Oranges, 20
Banana, 50
I have a latex template
\docementclass{article}
\begin{document}
I have [number] [Name]
\end{document}
I would like to ...
0
votes
1
answer
232
views
color a csv table
I have a CSV file and I want some entries be colored and bold. for example "bezahlt" should be green and bold. "unbezahlt" should be red and bold. "offen" should be black ...
0
votes
1
answer
119
views
CSVSimple ignoring line when enclosed field in double quotes has comma in it
I'm trying to display a very large CSV file as a table which is generated from a program.
The output of the program is a compliant RFC 4180 CSV file, and as such any field which contains a comma is ...
1
vote
2
answers
115
views
How to read variables from csv file based on context
I'm trying to read two variables from a csv file.
function,value
1. pos,some text
2. pos,some other text
This runs before \begin{document} and I wan't the value of 1. pos in \firstvar and the value ...
2
votes
3
answers
42
views
Parboxes generated in a for loop go off the end of my document page
I am a TeX novice. I am looking to typeset an arbitrary number of small (18 mm x 7 mm) labels which are produced iteratively based on alphanumeric strings stored in a CSV file. Each label should ...
0
votes
1
answer
49
views
how to change the format of date to exported to a CSV file
I want to write export some Information in a csv data.
One thing I don't get in in the csv data, it is the date.
Firstly when I use \today in my Latex document I get 15.January 2022, but I want it in ...
1
vote
1
answer
130
views
LaTeX - Create a table from a CSV file with borders
As many of you, I wanted to automate as many things as possible when creating my files.
I have to create tables often, so I figured that loading from a CSV file would be the most comfortable for me. (...
0
votes
1
answer
120
views
Get y value of linear regression plot at xmax
I'm creating a dynamic LaTeX (LuaLaTeX) script, which is creating a plot out of a given CSV file. Settings like xmin, xmax etc. depend on that CSV file.
That CSV file contains the storage utilization ...
1
vote
1
answer
84
views
Is there a standard way of associating an image with a biblatex entry?
I have a list of articles in a bib file and would like to associate a different image with each entry. Is there any standard way of doing this?
To put this into context, in order to import the data ...
2
votes
2
answers
70
views
input specific elements from csv
I have a csv table and I want to input specific cells.
For instance, my csv is project.csv:
, obj, resources, wp
task1.1, 1 , 2k , 1
task2.1, 2 , 3k , 2
task3.1, 3 , 4k , ...
1
vote
2
answers
294
views
Importing CSV data without header
I was trying to import CSV data into a table. The CSV file has no header and I want to include a header in the table without editing the CSV file. How can I do that?
Here is an MWE based on my ...
0
votes
1
answer
86
views
DTLforeach* - "unrecognized key in key option"
I'm quite new to the LaTeX universe, so ..., in fact, I'm not sure, if the DTLtool is best suited for my purposes.
I'd like to use data from a .csv in a table environment used for all tables in the ...
1
vote
1
answer
76
views
pgfplotstabletypeset in a custom command for CSV parsing
I created a dynamic table in order to cast inline CSV data easily to a table and want to use it now as a custom command, in order to make the table command easy to use for my colleagues.
This first ...
0
votes
1
answer
128
views
Plot a .dat data set with pfgplots and substract the first values
I would like to plot a .dat or .csv data set with tikz. The first column is the time and the second one the voltage. Since the data set is pretty huge, I already reduced its size by reading only every ...
1
vote
2
answers
188
views
Only receiving the column titles when using csvsimple and \csvautotabular
I'm currently running into an issue where I'll only get the titles of my columns showing for my table when using csvsimple with \csvautotabular.
The current code I used to produce this is
\...
1
vote
1
answer
234
views
Highlight maximum value in each row in csvsimple table
I am currently using csvsimple (in pdfLaTeX) to generate a table from a csv file:
\documentclass{article}
\usepackage{xcolor}
\usepackage{csvsimple}
\usepackage{siunitx}
\usepackage{booktabs}
\...
0
votes
1
answer
117
views
Is there an equivalent of datatool's \DTLifhaskey for value?
I'm looking for a way to test if a (non-key) value in a column does exist. I basically want to check if
\DTLfetch{db name}{col1 name}{col1 value}{col2 name}
is giving me a value from the db or an '...