我有一个矩阵'UserID'中的ID列表。我想创建一个xls或csv文件,这个UserID是它的标题行。行数是:2200000,列数是11.列的标签是1996 - 2006年。我阅读此页:用特定的行和列标题创建一个xls或csv文件
但是这个代码给我的错误。虽然有时对于行数不太适用,有时也不会回答。任何人都可以介绍一个能够做到这一点的程序? (用MATLAB或甚至C#代码)
我写这篇文章的代码:
data=zeros(2200000,11);
data_cells=num2cell(data);
col_header={'1996','1997','1998','1999','2000','2001','2002','2003','2004','2005','2006'};
row_header(1:2200000,1)=UserID;
output_matrix=[{' '} col_header; row_header data_cells];
xlswrite('My_file.xls',output_matrix);
,我得到这个错误:
The specified data range is invalid or too large to write to the specified file format. Try writing to an XLSX file and use Excel A1 notation for the range argument, for example, ‘A1:D4’.
我们不是在这里为你写代码。告诉我们你已经尝试了什么,并解释发生了什么问题。 – RandomStranger
@Bas我更新了这篇文章。 – Eli