Excel to base64

Is there any way to convert excel to base64 and vice versa?

@mrunal.a.deshmukh,

Yes, you can use Aspose.Cells for this purpose. You can use it to convert Excel files to and from Base64 encoded strings.
See the following sample code for your reference.
e.g.,
Sample code:

//Convert Excel to Base64:
// Load Excel file
Workbook workbook = new Workbook("e:\\test2\\InputFile.xlsx");

// Convert to Base64 string
MemoryStream stream = new MemoryStream();
workbook.Save(stream, SaveFormat.Xlsx);
string base64String = Convert.ToBase64String(stream.ToArray());

//Convert Base64 to Excel:
// Decode Base64 string
byte[] excelData = Convert.FromBase64String(base64String);

// Load Excel file from byte array
MemoryStream stream1 = new MemoryStream(excelData);
Workbook workbook1 = new Workbook(stream1);

// Save Excel file
workbook1.Save("e:\\test2\\output.xlsx");

Hope, this helps a bit.

Thanks for your response.

@mrunal.a.deshmukh,

You are welcome.