0

I need some help with creating .xlsm file from a string data in java. I have a .xlsm file with multiple sheets, stored as text in sybase database. I read this file content from the database in a java string and now I want to create .xlsm file from this string data. is this possible ?

Any help is highly appreciated.

thank you.

Kabeer
  • 69
  • 1
  • 5
  • You mean to say that whole content of your .xlsm file is stored in database. And it is stored in text or is it a blob object? – Sariq Shaikh Dec 12 '14 at 07:55
  • yes whole content of .xlsm is stored in sybase database as text data type – Kabeer Dec 12 '14 at 08:46
  • If the code for storing the file as text doesnt do any manipulation than you can simply read the text from database and create a file out of it with extension .xlsm. Have you tried that out ? – Sariq Shaikh Dec 12 '14 at 10:23
  • Thanks for the reply Mohammed. Tried what you have suggested but when try to open the file which is created from the data stored in database, it says file is corrupted. – Kabeer Dec 22 '14 at 06:15
  • btw, found solution on the line you suggestion Mohammed. :) I stored the file file content as image data type and read it as byte stream and wrote to the file. thank you. – Kabeer Dec 22 '14 at 14:02
  • Glad to hear that you were able to solve on your own. Storing the file content to BLOB object is the correct approach. You can add your solution as answer and mark your answer as accepted. – Sariq Shaikh Dec 22 '14 at 14:12

0 Answers0