• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Export data to Excel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Export data to Excel


  • Subject: Re: Export data to Excel
  • From: Chris Ridd <email@hidden>
  • Date: Mon, 22 Apr 2002 10:28:17 +0100

On 22/4/02 7:29 am, Peesapaty Ramesh <email@hidden>
wrote:

> Hi All,
> i want to export data in a table view into excel file.

I can successfully drag from a NSTableView and drop into an open Excel
worksheet. Would that be good enough for you? All I did in my
tableView:writeRows:toPasteboard: method was to construct an NSString
formatted using @"\t" and @"\n" between columns and rows, and write it to
the pasteboard for the type NSStringPboardType. More straightforward than I
was expecting...

Presumably you could transfer it using copy and paste and the same sort of
formatted string, though I've not tried that.

> i have tried creating a file with extension".xls" and writing data into
> it .
> but when i am trying to open it asks " choose application" and asks for
> formating when i select Excel.
> I want the file to be opened once it is double clicked instead of saying
> "choose application".
> help me if any one has created a new excel file and exported data into
> it.

The Excel file format is proprietary to Microsoft, and is a binary format.
You can't just write stuff to a file whose name ends in .xls :-(

I think the only way you're going to be able to generate XLS is to pay MS
money to get access to it :-( That's probably what P&L (Mesa) had to do.

You could also try writing the information to disk in a CSV file.

Cheers,

Chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Export data to Excel
      • From: Alex Rice <email@hidden>
References: 
 >Export data to Excel (From: "Peesapaty Ramesh" <email@hidden>)

  • Prev by Date: Re: FSSpec for saving a movie with FlattenMovieData() from an NSString*?
  • Next by Date: Being informed when the window moves
  • Previous by thread: Export data to Excel
  • Next by thread: Re: Export data to Excel
  • Index(es):
    • Date
    • Thread