anylogic - 使用 Anylogic 在 excel 中保存信息时出现 XmlValueDisconnectedException
问题描述
我正在尝试用我的 java 代码覆盖一个 excel 文件:
List <Tuple> copy =
selectFrom(delivery_plan).
list();
int row = 2;
int lastrow2 = main.DeliveredData.getLastRowNum(2);
for(int row2=2; row2<= lastrow2; row2++){
main.DeliveredData.clearCell(2,row2,1);
main.DeliveredData.clearCell(2,row2,2);
main.DeliveredData.clearCell(2,row2,3);
main.DeliveredData.clearCell(2,row2,4);
main.DeliveredData.clearCell(2,row2,5);
main.DeliveredData.clearCell(2,row2,6);
};
//iterating through all entries and saving into our excel sheet
for(Tuple tup : copy){
main.DeliveredData.setCellValue(tup.get(delivery_plan.data),2,row,1);
main.DeliveredData.setCellValue(tup.get(delivery_plan.product),2,row,2);
main.DeliveredData.setCellValue(tup.get(delivery_plan.original_committed_qty),2,row,3);
main.DeliveredData.setCellValue(tup.get(delivery_plan.updated_committe),2,row,4);
main.DeliveredData.setCellValue(tup.get(delivery_plan.min_qty),2,row,5);
main.DeliveredData.setCellValue(tup.get(delivery_plan.max_qty),2,row,6);
row ++;
};
main.DeliveredData.writeFile();
但是,当我的代码执行时,我收到以下错误消息:
org.apache.xmlbeans.impl.values.XmlValueDisconnectedException java.lang.RuntimeException: org.apache.xmlbeans.impl.values.XmlValueDisconnectedException
我该如何解决这个问题?
解决方案
推荐阅读
- ios - 如何在 Swift 中使用 HOIN H58 打印机打印图像
- angular - Angular 5 - 参数化路由的替代方案
- vba - 绕过数组公式VBA的字符限制
- c# - Raycast 如何与 Unity 的 Canvas UI 元素交互?
- android - 如何自动获取firebase'child('')'?(android)
- swift - Swift guard let 错误:条件绑定的初始化程序必须具有可选类型,而不是 '[String : String]' 在 swift 中?
- c# - WPF C# 数据绑定 - MessageBox.Show
- javascript - 使导航菜单滑入
- javascript - 如何在网站打开时禁用 cookie
- go - 将切片作为行动态添加到二维切片