Excel 시트에서 NSImage를 내보내려면 어떻게해야합니까?Excel 시트로 NSImage 내보내기
아래 작업을 시도하면 Microsoft Excel 응용 프로그램에서 해당 내용을 읽을 수 없습니다.
NSBitmapImageRep *imageRep = [self.displayView bitmapImageRepForCachingDisplayInRect:[self.displayView bounds]];
[imageRep setSize:self.displayView.frame.size];
[self.displayView cacheDisplayInRect:[self.displayView bounds] toBitmapImageRep:imageRep];
NSImage *image1 = [[NSImage alloc] initWithSize:NSMakeSize(imageRep.pixelsWide, imageRep.pixelsHigh)];
[image1 addRepresentation:imageRep];
[[image1 TIFFRepresentation]
writeToFile:@"AbsolutePath/ExportImageTest.xlsx"atomically:YES];
엑셀 시트에서 NSImage로 변환 된보기를 어떻게 내보낼 수 있습니까?
TIFF는 Excel 스프레드 시트가 아닙니다. .xlsx가있는 TIFF를 작성하면 왜 그 파일이 하나로 변환 될 수 있습니까? –
네가 맞다. Brad,하지만 Excel 시트에서 NSImage를 사용하여이 작업을 수행하는 데 도움을 줄 수 있습니까? –