Excelwriter Image Problems

liunx

Guest
Hi,<br /> having issues with insertBitmap(). Do you have any examples or suggestions on how to get a image through excelwriter to the page? <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> Thanks.<!--content-->
Welcome to the forums omegafi. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />Sorry, I don't have a clue but maybe one of our members will have a suggestion.<!--content-->
Welcome to the forum, omegafi. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
Welcome, omegafi. Hopefully someone will come along soon with information on this subject.<br /><!--content-->
What kind of problem are you having with insertBitmap()?<br /><br />Here's a very basic example of inserting a Bitmap into a spreadsheet and sending it to the browser that works in TCH's environment. Your environment may differ:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><?php<br />ini_set("include_path", get_include_path().":/home/myaccount/php");<br /><br />ini_set("max_execution_time","30"); // not required unless you are hitting a limit<br />ini_set("memory_limit","32M"); // not required unless you are hitting a limit<br /><br />require_once 'Spreadsheet/Excel/Writer.php';<br /><br />$workbook = new Spreadsheet_Excel_Writer();<br />$workbook->setTempDir('/home/myaccount/tmp');<br /><br />// Creating a worksheet<br />$worksheet =& $workbook->addWorksheet('Test for Bitmap');<br /><br />$worksheet->insertBitmap(0,0,'image.bmp');<br /><br />//send the file<br />$workbook->send('test.xls');<br />//close the workbook<br />$workbook->close();<br /><br />?><!--c2--></div><!--ec2--><!--content-->
First off thanks for the welcome and the example. I am having issues with insertBitmap() actuall inserting. When I put that function in the code, it causes the excel worksheet to error and lose all the formatting data? Is there some unspoken file limit? My code matches ur example. My boss is all over my arse and I dont have a clue how to get the grapihc in the excel file. Is there any other ways to get graphics in? Thank, guys.<br /><!--content-->
Unfortunately I haven't ever actually used ExcelWriter (I installed it simply to troubleshoot another person's problem), so I'm not sure how much additional help I can be.<br /><br />What kind of error are you getting? Are you trying to insert the bitmap into a single cell? Unfortunately the documentation for ExcelWriter is pretty sparse.<!--content-->
I am trying to insert a bitmap in cell 0,0 of the worksheet, which is the top left hand corner. Every example( all 2 of them) on the internet are all the same, I copied it to the t and it says that it can't load with available resources. <br /><!--content-->
 
Back
Top