Write raw cell data without any column caption on the first row #589
-
|
I would like to simply write raw data (from an array string[][]) into an excel file. |
Beta Was this translation helpful? Give feedback.
Answered by
michelebastione
May 14, 2026
Replies: 1 comment
-
|
Hello, sorry for the late reply. If you're still trying to solve the issue you can convert your data to a string[][] data = [["a", "b", "c"], ["1", "2", "3"]];
var maxLen = data.Max(x => x.Length);
var dt = new DataTable();
for (int i = 0; i < maxLen; i++)
dt.Columns.Add(null, typeof(string));
foreach (var row in data)
dt.Rows.Add([..row]);
var conf = new OpenXmlConfiguration { AutoFilter = false, FreezeRowCount = 0 };
MiniExcel.SaveAs(yourPath, dt, printHeader: false, configuration: conf); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
michelebastione
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, sorry for the late reply. If you're still trying to solve the issue you can convert your data to a
DataTableas a workaround: