我在字节数组方面表现出色。我可以使用以下代码将此字节数组保存到excel文件中:
import org.apache.commons.io.FileUtils;
...
private byte[] fileInBytes; // contains Excel in bytes
/**
* Writes byte array to file
* @throws IOException
*/
public void writeByteToFile() throws IOException {
File targetFile = new File(uploadLocation + this.diskName);
FileUtils.writeByteArrayToFile(
targetFile,
this.fileInBytes
);
}
但是,如何将包含excel数据的字节[]转换为csv字节数组(?)并以CSV格式存储此excel?