Re: microsoft file formats in cocoa
Re: microsoft file formats in cocoa
- Subject: Re: microsoft file formats in cocoa
- From: Kirk Kerekes <email@hidden>
- Date: Mon, 18 May 2009 07:12:17 -0500
-- And it is easy to wrap in a Cocoa wrapper -- I've done so. The
interface is appended to this email.
The libxls open source project on sourceforge.net allows you to read
and parse .xls files. This library works under OSX - I know, I'm one
of the developers :-)
//
// XLSWorkbook.h
// PETool
//
// Created by kkerekes on 12/27/08.
// Copyright 2008 Safety Training Systems. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "libXLS/xls.h"
@class XLSWorkbook;
@interface XLSWorksheet: NSObject
{
NSString * _name;
NSData * _worksheetRecordData;
NSArray * _rows;
}
+ (XLSWorksheet *) worksheetAtIndex: (uint32_t) idx fromWorkbook:
(XLSWorkbook *) book;
+ (XLSWorksheet *) worksheetWithName: (NSString *) name fromWorkbook:
(XLSWorkbook *) book;
- (NSArray *) rowAtIndex: (uint32_t) index;
@property (retain) NSString * name;
@property (retain) NSData * worksheetRecordData;
@property (retain) NSArray * rows;
@property (readonly) NSUInteger rowCount;
@property (readonly) NSUInteger columnCount;
@property (readonly) xlsWorkSheet * worksheetRecord;
@end
@interface XLSWorkbook : NSObject
{
NSString * _path;
NSData * _workbookRecordData;
NSArray * _workSheets;
NSDictionary * _workSheetsByName;
}
+ (NSStringEncoding) xlsStringEncoding;
+ (XLSWorkbook *) workbookAtPath: (NSString *) path;
- (XLSWorksheet *) worksheetAtIndex: (uint32_t) idx;
- (XLSWorksheet *) worksheetWithName: (NSString *) name;
- (NSArray *) worksheetNames;
@property (retain) NSString * path;
@property (retain) NSData * workbookRecordData;
@property (retain) NSArray * worksheets;
@property (retain) NSDictionary * workSheetsByName;
@property (readonly) xlsWorkBook * workbookRecord;
@end
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden