Issue in writing to an excel from Cocoa application containing japanese language

I

Indra

Hi,

I am facing problem in writing to a excel file from Cocoa(Objective-C)
application. It works fine for single byte characters. But when the
data contains multibyte characters(e.g.- for Japanese data), it is not
showing properly in excel. The same file when opened in BBEdit/TextEdit
shows the data properly.

I am using the following API for writing to the file:

- (BOOL)writeToFile:(NSString *)path atomically:(BOOL)flag of
NSString class

Tried also by changing the string encoding to all available encodings
in NSString class. Did not work.

I am not sure about the encoding excel supports for Japanese data.


However, manual copying and pasting the data in Excel works fine and
visible in the desired format. So, the writing could be automated
through AppleScript and would work properly. But I require to do it
programmatically and transparently, thereby prohibiting the use of
AppleScript.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top