小编low*_*wak的帖子

在不使用VBA的情况下突出显示Excel中的活动行/列?

我想要实现的是突出显示活动的行或列.我使用了VBA解决方案,但每次使用Selection_change事件时,我都没有机会撤消工作表中的任何更改.

有没有办法以某种方式突出显示活动行/列而不使用VBA?

excel vba highlight

29
推荐指数
4
解决办法
8万
查看次数

Sum Formula在添加文本时很奇怪

我有一个宏,其中一个命令是创建公式来总结.直到今天有人向我展示问题时,一切都很好.

Sum函数应该给我:36286,54.当函数看起来像这样:=SUM(I7:I128)一切都好,但是当我想像这样添加一些文本时:=SUM(I7:I128) & " CZK"它给了我:36286,5399999999 CZK

我仔细检查了值,似乎没有任何错误......问题不是通过宏创建公式引起的,同样的问题似乎是手动执行.我调查了当使用'For Next'循环添加它时,最后那些"99999999"出现在第50个值左右.删除一些值使"99999999"消失,但我不知道为什么那些.

一切都是在下面的数据上完成的,任何想法出了什么问题?

3 883,60
5 679,75
1 633,05
7 825,67
8 541,85
892,50
313,00
887,44
99,52
277,69
138,84
138,84
138,84
277,69
277,69
138,84
34,71
34,71
34,71
74,30
74,82
130,43
34,72
34,72
212,74
99,52
99,52
149,74
-2,74
212,74
212,74
212,74
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88
13,88 …
Run Code Online (Sandbox Code Playgroud)

excel sum worksheet-function

1
推荐指数
1
解决办法
79
查看次数

XML转换在不同的部分中复制一次元素两次


我有一个XML需要一些转换才能正确导入我们的数据库.我做了大部分更改,但是我在复制一个元素时遇到了问题(ApprovedCountry标记中的E100customerKey).不知道如何在这部分文件中复制它.请参阅以下代码:

合作伙伴收到的示例代码:

<?xml version="1.0" encoding="UTF-8"?>
<CustomerList>
    <TransferHeader>
        <Apllication>ApllicationForTransferCustomer</Apllication>
        <Sender>Partenr</Sender>
        <MailAdr>mail@mail.pl</MailAdr>
        <GeneratedDate>20160114</GeneratedDate>
        <NumberOfCustomers>3</NumberOfCustomers>
    </TransferHeader>
    <CustomerList>
        <Customer>
            <E100customerKey>03-98</E100customerKey>
            <VATNumber>2222222222</VATNumber>
            <EUVATNumber>11111111111</EUVATNumber>
            <CustomerName1>CustomerName</CustomerName1>
            <LineOfBusiness>uslugi transportowe</LineOfBusiness>
            <NACEcode>4941</NACEcode>
            <RequiredForPrivateCompany/>
            <ApprovedCountriesList>
                <ApprovedCountry>
                    <CountryCode>ES</CountryCode>
                    <ServiceType>Normal</ServiceType>
                    <PartnerPercent>3</PartnerPercent>
                </ApprovedCountry>
            </ApprovedCountriesList>
        </Customer>
    </CustomerList>
</CustomerList>
Run Code Online (Sandbox Code Playgroud)

需要的代码:

<?xml version="1.0" encoding="UTF-8"?>
<CustomerList>
    <CustomerList>
        <Customer>
            <E100customerKey>03-98</E100customerKey>
            <VATNumber>2222222222</VATNumber>
            <EUVATNumber>11111111111</EUVATNumber>
            <CustomerName1>CustomerName</CustomerName1>
            <LineOfBusiness>uslugi transportowe</LineOfBusiness>
            <NACEcode>4941</NACEcode>
            <ApprovedCountriesList>
                <ApprovedCountry>
                    <E100customerKey>03-98</E100customerKey>
                    <CountryCode>ES</CountryCode>
                    <ServiceType>Normal</ServiceType>
                    <PartnerPercent>3</PartnerPercent>
                </ApprovedCountry>
            </ApprovedCountriesList>
        </Customer>
    </CustomerList>
</CustomerList>
Run Code Online (Sandbox Code Playgroud)

到目前为止我的XSL文件:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output omit-xml-declaration="yes" indent="yes" encoding="UTF-8" />

 <xsl:template match="node()|@*">
  <xsl:copy>
   <xsl:apply-templates select="node()|@*"/>
  </xsl:copy>
 </xsl:template>

<!-- Probably needs to fix this …
Run Code Online (Sandbox Code Playgroud)

xml xslt copy transformation

1
推荐指数
1
解决办法
272
查看次数

标签 统计

excel ×2

copy ×1

highlight ×1

sum ×1

transformation ×1

vba ×1

worksheet-function ×1

xml ×1

xslt ×1