Questions tagged [csv]
The CSV tag concerns text-based files containing tabular material using commas as a separator.
326
questions
0
votes
2
answers
50
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
43
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
35
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
79
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
98
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
22
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
20
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
83
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
28
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
25
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
149
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
102
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
36
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
51
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
36
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
34
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
47
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
89
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
48
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
47
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
67
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
57
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
40
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
85
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
101
views
Only receiving the column titles when using csvsimple and \csvautotabular
Stackexchange!
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 ...
1
vote
1
answer
115
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
89
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 '...
2
votes
2
answers
88
views
datatool's \DTLfetch returns last found value instead 'Undefined Value' if entry is not found
I want to have some condition of what to do if the key that was provided is not in the db. But \DTLfetch does return a value in case it had found one before. How can I catch all the 'x' in this ...
0
votes
1
answer
39
views
Return type for \newcommand probably doesn't fit \DTLfetch?
I want to fetch from the csv file with a boolean condition (either give me the fruit or give me the count). The first command (CMDone) works and says "count" and the fetch also works and ...
0
votes
0
answers
68
views
pgfplots: runaway argument when using \thisrow for processing a table
I'm trying to read a .csv file and draw some plots based on the data I got. Because the values are really low I want to multiply them by 1000 so I can label the y axis as mA, but it seems like I got a ...
1
vote
1
answer
84
views
Draw Plot (tikzpicture) from csv file in TEX
I am having troubles using csv files to create plot similar to png file.
There are two csv files which includes results of two different models (Kobert, XLM-R).
I want to make plot in latex looks same ...
0
votes
0
answers
35
views
Need help on "advance" csv table import
I am trying to import a .csv table that has new line characters on select cells. .
The .csv code looks like this:
title 1,title 2,title 3
item 1,"data 1a
data 1b","result 1a
result 1b&...
1
vote
1
answer
30
views
latex sidewaystable, pgfplotstable produces unwanted c's in first cell
I'm getting a bunch of c's in the first cell of my table. The cell is blank in the .csv file. I'm not sure why and I can't figure out how to remove the c's. They are not in the .csv file. I think it ...
2
votes
1
answer
37
views
Looped CSV data inside tikzpicture axis is only drawing last point of many, but multiple times
I have a CSV from which I'm trying to draw dots using \node within a tikzpicture. I can get it to read the data and draw something, but it only draws the last row, and multiple times.
I know that ...
2
votes
1
answer
75
views
tabularx and csvreader putting everything in the last column with one row
This is the same problem I ran into from the previous question, I finally narrowed it down to some line break problem. I found several line of code, that suppose to work and tried it on with my ...
0
votes
1
answer
38
views
Was trying to import csv table to Texmaker, the last column gives error when I try to fix the width
I was trying to import a csv table to my Tex, with csvsimple. The idea was to fix every column width and make the text wrapped around. However, whenever I change the last column identifier l to p{2cm} ...
1
vote
2
answers
129
views
csvautotabular not displaying full data from .csv file
Problem
On section 1.2 First Steps of the csvsimple manual [link: https://ctan.math.washington.edu/tex-archive/macros/latex/contrib/csvsimple/csvsimple.pdf], the instructions are to use the following, ...
0
votes
1
answer
33
views
pgfplots macros: x filter/.code={\pgfmathparse{#1/1000000}\pgfmathresult} doesn't work for csv file
I would like, to have x-axes in MHz range, therefore I would like to use command:
x filter/.code={\pgfmathparse{#1/1000000}\pgfmathresult}
but nothing is happen. I am using lualatex for image ...
5
votes
3
answers
136
views
Defining new commands from csv-file?
I would like to define new commands and be able to change the output from a csv-file. Let's say the csv-file is semicolon seperated:
Name; Score
Max; 12
Peter; 32
Anna; 27
Now I would like to have ...
1
vote
1
answer
57
views
csvsimple repeats head elements instead of CSV row elements
I try to format a CSV file as a table and ran into the issue that the csvsimple package repeats the head elements after a % sign appears in the file. Consider the following MWE (strongly reduced from ...
2
votes
2
answers
188
views
Use LaTeX to produce parts lists?
I have a document where I describe how to renovate my house. Now someone wants an additional document (in the appendix and/or as extra CSV file) with parts lists of all windows and doors and so on.
...
0
votes
0
answers
62
views
pgfplots errors when reading in data in standalone file
I'd appreciate any help with this. I've had a read of some similar problems, but not the same as mine. I'm trying to create an image using pgfplots, in a standalone .tex file. I have a CSV file, with ...
1
vote
1
answer
61
views
pgfplotstable - siunitx error with data from csv with values in scientific notation
I want to create table using pgfplotstable with data from csv file with values in scientific notation, but when i try to compile the file to pdf I end up with following siunitx errors
Package siunitx: ...
1
vote
1
answer
55
views
How to read csv into table with custom header?
I want to read a csv into a table that I defined like follows:
\begin{table}[bp]
\centering
\caption{Reading csv.}
\label{table:csv}
\begin{tabular}{cccc}
\toprule
\multirow{2}{...
0
votes
1
answer
113
views
plotting 4 variables graph from csv file
I have a csv file with 4 columns like this:
P Q R cost
6, 3, 1, SC
6, 2, 2, SC
6, 1, 3, SC
5, 4, 1,
5, 3, 2,
5, 2, 3, DR
5, 1, 4, DR
4, 5, 1,...
0
votes
0
answers
52
views
Creating a heatmap from CSV data [duplicate]
This questions solves the same problem I have, but in the example the data comes from filecontents and the solution involves changing the data, in my case the data comes from a CSV which I cannot ...
1
vote
0
answers
34
views
LaTeX commands in pgfplots legend entries from csv import
I am trying to import data from a csv file, where legend entries are automatically taken from the csv file's header. Those legend entries contain LaTeX math code.
% used PGFPlots v1.16
\documentclass[...
0
votes
2
answers
161
views
Can't fit table from csv in page
I'm very unexperienced in Latex but I need to write a document that uses table from a csv file and I'm having a really hard time knowing how to do it. The main problems:
If I include the header from ...
1
vote
1
answer
53
views
Write CSV in document with dynamic filename
I'm super new to Latex and I'm trying to do automatic documents that present information regarding each project. Every folder and project has a different name/code and I'd like the document to add a ...
1
vote
0
answers
17
views
create bib files from csv [duplicate]
I have bibliographical references ordered in a spreadsheet and I want to create a .bib file to use then in latex documents. I have found the way to transforma a .bib file into a csv, but not the ...