我是新来的欢笑,并试图看看是否有人了解如何处理excel文件的欢乐。
现在,我的mirth通道非常适合zip文件、csv和txt文件,而不是xlsx。当遇到xlsx文件时,它会出错。
[2022-02-08 09:37:00,037] ERROR (com.mirth.connect.donkey.server.channel.Channel:1288): Error processing message in channel xlsx (5447c43e-7aee-4ade-9460-d490edef7f04).
com.mirth.connect.donkey.server.channel.ChannelException:
at com.mirth.connect.donkey.server.channel.Channel.dispatchRawMessage(Channel.java:1243)
at com.mirth.connect.donkey.server.channel.SourceConnector.dispatchRawMessage(SourceConnector.java:192)
at com.mirth.connect.donkey.server.channel.SourceConnector.dispatchRawMessage(SourceConnector.java:170)
at com.mirth.connect.connectors.file.FileReceiver.processFile(FileReceiver.java:418)
at com.mirth.connect.connectors.file.FileReceiver.processFiles(FileReceiver.java:328)
at com.mirth.connect.connectors.file.FileReceiver.poll(FileReceiver.java:239)
at com.mirth.connect.donkey.server.channel.PollConnectorJob.execute(PollConnectorJob.java:49)
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)Caused by: com.mirth.connect.donkey.server.data.DonkeyDaoException: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00
at com.mirth.connect.donkey.server.data.jdbc.JdbcDao.insertContent(JdbcDao.java:287)
at com.mirth.connect.donkey.server.data.jdbc.JdbcDao.insertMessageContent(JdbcDao.java:199)
at com.mirth.connect.donkey.server.data.buffered.BufferedDao.executeTasks(BufferedDao.java:110)
at com.mirth.connect.donkey.server.data.buffered.BufferedDao.commit(BufferedDao.java:85)
at com.mirth.connect.donkey.server.data.buffered.BufferedDao.commit(BufferedDao.java:72)
at com.mirth.connect.donkey.server.channel.Channel.dispatchRawMessage(Channel.java:1215)
... 8 moreCaused by: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2155)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:288)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:430)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:356)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:168)
at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:135)
at com.mirth.connect.donkey.server.data.jdbc.JdbcDao.insertContent(JdbcDao.java:284)
... 13 more ```发布于 2022-02-28 16:40:17
目前,无法本地读取Excel文件。您可能想为此执行一个自定义java类,然后将jar文件导入定制库中。总的来说,这一切都取决于你希望实现什么。例如,可以使用源连接器上的文件读取器循环遍历和抓取Excel文件,然后通过通道目标连接器上的HTTP发送方发送到任何能够处理Excel文件的HTTP端点(即PHP或R中的REST应用程序),并在需要时返回JSON/XML响应。如果只想保存数据库条目,可以考虑在转换器步骤中使用诸如executeRuntimeCommand("C:\Windows\System32\cmd.exe","/C“、”C:\sql_save.bat“等命令来启动Windows脚本来为您保存。
发布于 2022-05-16 03:36:33
Java世界中显而易见的答案(您可以从Mirth调用)不起作用。Poi,不能使用从Office文件中读取的标准框架。它有很多依赖项,其中大部分已经在Mirth内部了。然而,似乎没有任何版本的Poi能与Mirth所加载的内容相匹配。我认为我可以处理依赖关系,这样我就可以获得一个新的类加载器,但显然不是。
https://stackoverflow.com/questions/71036073
复制相似问题