We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

IMG to XLS

Hi guys

I would like to know if there's a way to export JPG or any kind of images file to Excel, but I need to follow the code below (the code below exports syncfusion grids to XLS):
------------------------------------------------------------
GridExcelExport excel = new GridExcelExport(this.GridGroupingControl1, "File.xls");
excel.ExportNestedTable = true;
excel.Export();
-------------------------------------------------------------
I need to have both things in the same excel sheet: Grid and Image.


Best Regards


6 Replies

LR Lokesh R Syncfusion Team April 4, 2011 10:55 AM UTC

Hi Victor,

Thank you very much for your interest in Syncfusion products.

We would like to clarify few things before proceeding further on this.

1. Could you please let us know which conversion part you were taking in your previous update.

a) Excel to image.
b) Image to Excel.
c) Grid, Excel to Image.

2. Also could you please let us know what kind of requirement you are trying to achieve using Essential XlsIO?. So that we can help you out on the same.

Please let us know if you need any clarifications.

Thanks,
Lokesh.




VE victor elizondo April 4, 2011 03:30 PM UTC

Hi Lokesh

Currently I have working the functionality of exporting SYNCFUSION WEB GRID to EXCEL ( I've attached an image about it) with the code below in Visual Studio with C#:

------------------------------------------------------------
GridExcelExport excel = new GridExcelExport(this.GridGroupingControl1, "File.xls");
excel.ExportNestedTable = true;
excel.Export();
-------------------------------------------------------------

Sometimes in the aspx file that contains the syncfusion web grid I could have a syncfusion webchart (I didn't mention this before). If that would occur, I need to export that webchart too, but I need do it according to the code above (I need to maintain the current functionality, that's the point).

Please let me know if you need any clarifications.

Thanks,
Víctor.



gridxsl_d85b875f.rar


VE victor elizondo April 4, 2011 05:34 PM UTC

Hi Lokesh

I forgot to mention something:

I think the solution of this problem must be pass an IMG to XLS. I'm able to convert the syncfusion webchart to IMG with this code below:

----------------------------------------------------------------
string fileName = ConfigurationManager.AppSettings["pathPDFImage"].ToString();
string file = fileName + ".jpg";
this.ChartWebControl1.SaveImage(file);
----------------------------------------------------------------

So, I would have an image to add to the XLS file previously metioned; but, if it could be possible pass WEBCHART to the XLS file directly that would be awesome.

Best Regards.



JJ Jawahar Jeevanandan J Syncfusion Team April 8, 2011 12:55 PM UTC

Hi Victor,

Thank you very much for your patience.

We are providing support to implement picture through XlsIO and I have included the code snippet for the same. Try this code snippet at your side, and please let us know if this helps you. Currently we do not provide support to implement web chart through XlsIO. We don’t have any immediate plan to implement this feature.

Code Snippet:

-----------------------------------------------------------------

string file = fileName + ".jpg";
IWorksheet sheet = workbook.Worksheets[0];
IPictureShape picture = sheet.Pictures.AddPicture(7, 10, file);

-----------------------------------------------------------------

Please let us know if you require further any clarifications.

Thanks,
Jawahar.




VE victor elizondo April 11, 2011 06:18 PM UTC

Hi Jawahar

I'm going to try with your code snippet and I will let you know about the result.

Best Regards.



JJ Jawahar Jeevanandan J Syncfusion Team April 12, 2011 11:50 AM UTC

Hi Victor,

Thanks for your update. And i am waiting for your response.

Regards,
Jawahar.


Loader.
Live Chat Icon For mobile
Up arrow icon