user1097579
user1097579

Reputation: 11

How to add image to excel file programmatically in iphone application?

I am working on one of the iphone project in which I need to create one excel file with multiple spreadsheets, where in each spreadsheet I need to have custom data with relative image which is nothing but photo taken from iPad2 main camera. For this I am creating xml file (Open Office XML) in which following is the format of creating single Row,

<Row ss:AutoFitHeight="0">
<Cell ss:Index=\"2\"><Data ss:Type=\"String\">City, State, Zip</Data></Cell>
<Cell ss:Index=\"4\" ss:MergeAcross=\"4\" ss:StyleID=\"s66\"/>
<Cell ss:Index=\"10\" ss:StyleID=\"s114\"><Data ss:Type=\"String\">Physical Structure</Data></Cell>
<Cell ss:Index=\"13\" ss:MergeAcross=\"2\" ss:StyleID=\"s66\"/>
</Row>

Do anyone have idea how to add image to cell ? Let me know !

Upvotes: 1

Views: 619

Answers (1)

Benny
Benny

Reputation: 5092

Just a suggestion as I do not know the excel format but I noticed a "data" element in there. maybe you could convert ur image into NSData and then from this generate a UTF8 encoded string representation for inclusion within the "data" element?

Again, its just an idea, it may not be the correct path to take but hopefully it might lead you to a solution.

Upvotes: 0

Related Questions