我尝试在 Flex 应用程序中读取 .xlsx 文件。现在我试图确定我的信息在哪里。因此,我从 .xlsx 文件中获取了 XML 数据:
var x:XML = <worksheet mc:Ignorable="x14ac"
xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">
<dimension ref="A1:F77"/>
</worksheet>;
现在我想获得维度属性“ref”。因此我使用以下代码:
var test:Object = x.dimension;
var value:Object = x.dimension.@ref;
如果我将模式表达式留在工作表中,两者都可以完美运行。如何通过包含模式获得正确的结果?有没有一种很好的方法来获取没有模式的 XML?
坦克为您提供帮助。