I have a file that contains 1,000 rows of product data. I want to select only a specific product type to print in my document.
Minimal code in main.tex:
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{product.tex}
%Type =1,2...10
No.,Type ,Name , Description
1, 1, A1,D1
….
30, 1, A1, D30
31, 2, A2, D31
…
131,2, A2, D131
132,3,A3,D132
….
249,4,A4,D249
…
1.000,10, A10,D1000
\end{filecontents*}
\begin{document}
%Need command can CHOOSE Type = 1 and/or 2, and/or 3, ...10
%i choose type = 1 & 3
\include{run.tex}
\end{document}
Product Types range from 1, 2, ..., 10. And in run.tex:
%Display like:
Name[i] & Description[j]
main.pdf result:
Type = 1 A1 - D1 … A1 - D30 Type = 3 A3 - D132 … A3 - D248

