@kuns200,
Thank you for your query.
I have checked different options for importing arrays but could not find any options which can fulfill your requirements, however using CSV, you may achieve it. Here an example is given where a string is to be formatted in memory and then that memory stream is to be loaded into Workbook as CSV data. Please modify it as per your requirements to create such string and then use it as mentioned in the following sample code.
TxtLoadOptions opts = new TxtLoadOptions();
opts.Separator = ',';
string data = string.Format("kunal,vivek,ashwin,sudhir" + Environment.NewLine + "apple,pineapple,lemon" + Environment.NewLine + "sandpiper,pigeon");
byte[] byteArray = Encoding.ASCII.GetBytes(data);
MemoryStream stream = new MemoryStream(byteArray);
stream.Position = 0;
Workbook workbook = new Workbook(stream, opts);
workbook.Save("output_out.xlsx");
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.