简体   繁体   English

Aspose Cell FileNotFoundException:EROFS(只读文件系统)

[英]Aspose Cell FileNotFoundException: EROFS (Read-only file system)

I get that error in the title when saving the excel file to pdf.将excel文件保存为pdf时,标题中出现该错误。 This is in Android by the way.顺便说一下,这是在Android中。 My code is basically like this:我的代码基本上是这样的:

Workbook workbook = new Workbook(filePath);
workbook.save(“MyPdf.pdf”, SaveFormat.PDF);

The filePath is a string that has a value of the file path of the excel file. filePath 是一个字符串,其值为 Excel 文件的文件路径。 I already granted those permissions in the manifest like what others would suggest yet I still have this error.我已经像其他人建议的那样在清单中授予了这些权限,但我仍然有这个错误。 With or without that ".pdf" extension, it will still not work.不管有没有那个“.pdf”扩展名,它仍然无法工作。

Your error denotes an io issue and nothing to do with Aspose.Cells for Android via Java APIs.您的错误表示 io 问题,与通过 Java API 用于 Android 的 Aspose.Cells 无关。 On Android, you need to specify sd card path for the device (where you will store both input and output files).在 Android 上,您需要为设备指定 sd 卡路径(您将在其中存储输入和输出文件)。 So, make sure you are doing the right thing.因此,请确保您正在做正确的事情。 See the sample code for your reference: eg请参阅示例代码以供参考:例如

Sample code:示例代码:

//Get the sd card path on the device
String sdCardPath = Environment.getExternalStorageDirectory().getPath() + File.separator;
Workbook workbook = new Workbook(sdCardPath + "Book1.xlsx");
workbook.save(sdCardPath + "MyFile.pdf", SaveFormat.PDF);

Should you have further queries or issue, you may also post in the forums .如果您有进一步的疑问或问题,您也可以在论坛中发帖。

PS.附注。 I am working as Support developer/ Evangelist at Aspose.我在 Aspose 担任支持开发人员/布道者。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android文件系统:java.io.FileNotFoundException:/ savedArticlesFile:打开失败:EROFS(只读文件系统) - Android file system: java.io.FileNotFoundException: /savedArticlesFile: open failed: EROFS (Read-only file system) java.io.FileNotFoundException:/temp.png:open failed:EROFS(只读文件系统) - java.io.FileNotFoundException: /temp.png: open failed: EROFS (Read-only file system) java.io.FileNotFoundException:打开失败:EROFS(只读文件系统) - java.io.FileNotFoundException: open failed: EROFS (Read-only file system) java.io.FileNotFoundException:/jacoco.exec:打开失败:EROFS(只读文件系统) - java.io.FileNotFoundException: /jacoco.exec: open failed: EROFS (Read-only file system) java.io.FileNotFoundException:stack.txt:打开失败:EROFS(只读文件系统) - java.io.FileNotFoundException: stack.txt: open failed: EROFS (Read-only file system) 在Android中创建新文件时出错:FileNotFoundException:/test.png:打开失败:EROFS(只读文件系统) - Error while creating a new file in Android: FileNotFoundException: /test.png: open failed: EROFS (Read-only file system) Android打开失败:EROFS(只读文件系统)错误 - Android open failed: EROFS (Read-only file system) error 异常“打开失败:EROFS(只读文件系统)”由 - Exception "open failed: EROFS (Read-only file system)" thrown by getAssets()。open-打开失败:EROFS(只读文件系统) - getAssets().open - open failed: EROFS (Read-only file system) 尝试在Android中创建文件:打开失败:EROFS(只读文件系统) - Trying to create a file in Android: open failed: EROFS (Read-only file system)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM