Posted 27 March 2020, 2:03 pm EST
I am trying to save the file as .xlsx in classic asp, but getting an error assembly not found grapecity spreadbuilder xlsx couldnot load file or assembly document.format.openxml
here is the code in .Net. even if .net, it’s not working. But my actual requirement is classic asp
//Dimension a Workbook and add a sheet to its Sheets collection
GrapeCity.SpreadBuilder.Workbook sb = new GrapeCity.SpreadBuilder.Workbook();
sb.FileFormat = FileFormat.Xlsx;
sb.UseCompression = true;
// sb.ProtectWorkBookStructure = false;
sb.Sheets.AddNew();
//Set up properties and values for columns, rows and cells as desired
sb.Sheets[0].Name = "Customer Call List";
sb.Sheets[0].Columns(0).Width = 2 * 1440;
sb.Sheets[0].Columns(1).Width = 1440;
sb.Sheets[0].Columns(2).Width = 1440;
sb.Sheets[0].Rows(0).Height = 1440 / 4;
//Header row
sb.Sheets[0].Cell(0, 0).SetValue("Company Name");
sb.Sheets[0].Cell(0, 0).FontBold = true;
sb.Sheets[0].Cell(0, 1).SetValue("Contact Name");
sb.Sheets[0].Cell(0, 1).FontBold = true;
sb.Sheets[0].Cell(0, 2).SetValue("Phone");
sb.Sheets[0].Cell(0, 2).FontBold = true;
//First row of data
sb.Sheets[0].Cell(1, 0).SetValue("GrapeCity");
sb.Sheets[0].Cell(1, 1).SetValue("Mortimer");
sb.Sheets[0].Cell(1, 2).SetValue("(614) 895-3142");
//Save the Workbook to an Excel file
sb.Save("c:\\GrapeTest" + @"\x.xlsx");