Skip to content

excel sheet with xml data #2

@ourdex86

Description

@ourdex86

Hi,

This is Bharath.

When I use this RSSheet library into my application, it is saving in .xls format bu when I open it, Its showing complete xml string not .xls

I have used the following code

RSworkBook * folder = [ [RSworkBook alloc] init];
folder.author = @"andrea cappellotto";
folder.version = 1.2;

RSworkSheet * sheet = [[RSworkSheet alloc] initWithName:@"prova"];

RSworkSheetRow * row = [[RSworkSheetRow alloc] initWithHeight:20];
[row addCellString:@"prova"];
[row addCellString:@"prova2"];
[sheet addWorkSheetRow:row];

RSworkSheetRow * row2 = [[RSworkSheetRow alloc] initWithHeight:25];
[row2 addCellNumber:100];
[row2 addCellData:[NSDate date] ];
[sheet addWorkSheetRow:row2];

[folder addWorkSheet:sheet];

NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDir = [documentPaths objectAtIndex:0];
[folder writeWithName:@"prova" toPath:documentsDir];

Could you please tel me what should I do? I am not getting proper excel sheet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions