Excel XML error: “Too many tags”

17 Feb 2006  in mid-morning  Matt Winckler

cheap cialis pill certified cialis cheap viagra in canada cialis buy drug buy generic cialis viagra buy 25mg viagra cheap viagra without prescription buy cheapest viagra on line purchase viagra cialis 10mg buying generic viagra cialis pills viagra from india cheapest sildenafil citrate cheap cialis no rx viagra india cialis bangkok viagra for order buy sildenafil internet buy generic viagra online buying cialis online where to order cialis tablet cialis find cialis no prescription required viagra cheap drug order cialis cheap online online pharmacy cialis cialis no rx order generic cialis price of cialis viagra soft drug viagra cheap viagra from uk order cialis no prescription order cheap viagra viagra drug order cheap cialis cheap cialis pharmacy best price for viagra cheap viagra from usa cost cialis cialis overnight shipping cheapest generic cialis online generic viagra online online viagra viagra sales cheap cialis in canada compare cialis prices online cialis online drug viagra online purchase discount cialis without prescription no rx viagra cialis overnight viagra uk cialis order cheap cialis from usa buying cialis cialis overnight delivery cialis in bangkok buy and purchase sildenafil online impotence treatment cheap price viagra viagra sale cheap cialis tablet drug cialis generic cialis online cheap viagra pharmacy find discount cialis online viagra malaysia cialis without a prescription buy cialis online cheap viagra rx buy no rx viagra cialis 20mg viagra in malaysia discount viagra online buy sildenafil cheap buy viagra low price buy cialis cialis cheap price cialis cheap generic viagra cialis canada low cost viagra buy cheap viagra cialis vs viagra order cialis from us cialis tablets find no rx cialis buy generic cialis online buy viagra overnight delivery cheapest cialis price buy cheapest cialis on line order cialis in canada viagra tablet viagra no online prescription find cheap cialis online viagra price order viagra no prescription cheap generic cialis buy viagra online cheap cialis uk cialis without rx generic cialis cheap viagra vs cialis order cialis on internet viagra tablets viagra purchase impotence drugs buy cialis generic cialis tablet cialis cheapest price order viagra from canada viagra generic cheap viagra from canada order cialis compare viagra prices online find cheap cialis impotence cure pfizer viagra find discount cialis cheapest cialis buy cialis from india impotence buy cheapest viagra online cialis side effects viagra order discount cialis online cialis in malaysia cialis in uk viagra in uk cialis online without prescription cialis online pharmacy order viagra buy viagra online viagra side effects cialis sale discount cialis no rx cheapest viagra find cialis order cialis no rx buy cialis low price buy viagra cheap drug cialis online purchase order discount viagra online 50 mg viagra 100 mg viagra 10mg cialis cost of cialis cheapest cialis prices buy discount viagra online cialis sales 50mg viagra cialis price buy viagra on internet cialis pill cheapest cialis online purchase viagra overnight delivery cheap cialis from canada cheapest viagra price cialis 20 mg buy sildenafil low cost order viagra without prescription buy viagra lowest price no prescription cialis order viagra on internet discount cialis overnight delivery cialis cheap drug viagra approved viagra no rx required compare viagra prices no rx cialis cheap cialis on internet buy viagra from india buy discount cialis online viagra pharmacy online order viagra from us cialis free delivery cialis for order buy cialis from canada viagra without rx viagra online review 10 mg cialis cheap viagra no rx cheapest viagra prices viagra prices cialis pharmacy order no rx cialis buy cialis in us buy cialis no prescription required order cialis from canada lowest price cialis cheap cialis internet online pharmacy viagra cheapest generic cialis generic drugs cialis india find cialis without prescription best price cialis buy viagra without prescription cheap cialis in uk where to buy viagra 20 mg cialis cheap cialis from uk buy sildenafil canada cialis no rx required cialis in us buy cialis overnight delivery cialis cheap price order cheap viagra online 20mg cialis buy cheap viagra online viagra internet viagra without prescription free cialis buy cialis us cialis buy buy viagra in canada order viagra cheap online find viagra without prescription viagra pills cheap cialis no prescription viagra online without prescription order generic viagra cialis discount viagra cheapest price purchase viagra no rx viagra no rx viagra cheap discount viagra overnight delivery sale cialis cialis pharmacy online purchase cialis without prescription pharmacy online cialis medication discount viagra buy cheap cialis impotence medication viagra medication find cialis on internet impotence pills cialis prices discount viagra without prescription cialis online cheap cialis online review find cheap viagra online buy viagra us purchase cialis online certified viagra where to order viagra buy cheapest viagra buy cialis internet order cialis online buy sildenafil online buy cialis cheap cheap viagra purchase cialis find discount viagra buy cialis on internet cialis buy online buy sildenafil online without a prescription viagra buy online order cheap cialis online viagra information no prescription viagra cost of viagra buy cialis in canada buy cialis online buy viagra cheapest generic viagra cialis us cialis australia fda approved cialis lowest price for viagra viagra bangkok cialis prescription cialis cost buy no rx cialis buy viagra internet viagra discount order viagra overnight delivery generic cialis viagra australia 25 mg viagra order viagra online viagra overnight cialis rx order cialis in us order viagra no rx order discount cialis online viagra vendors order viagra in us buy sildenafil in uk viagra us buy generic viagra viagra canada viagra no prescription viagra cheap price cheap viagra tablet viagra free delivery overnight viagra purchase viagra online find cheap viagra cialis malaysia best price viagra cialis free sample find viagra on internet cialis generic buy sildenafil in canada order cialis no prescription required cheapest viagra online purchase cialis no rx viagra in us order discount cialis cheap viagra internet free viagra cialis approved best price for cialis cialis from india find no rx viagra generic viagra viagra from canada viagra online pharmacy buy viagra from canada cheapest generic viagra online buy cheapest cialis discount cialis viagra overnight delivery cialis without prescription 100mg viagra cialis in australia price of viagra order cialis overnight delivery cheap viagra in uk buying generic cialis viagra pill buy cialis on line low cost cialis find discount viagra online buying viagra cheap cialis overnight delivery pharmacy cialis cheap viagra pill viagra prescription find viagra online buy cialis lowest price discount viagra no rx online cialis viagra free sample cheap viagra in usa find viagra cheap viagra online buy viagra no rx generic viagra cheap buy cialis without prescription buy viagra in us cheap viagra overnight delivery cheap cialis in usa cheap cialis online viagra order no rx viagra viagra soft tab find cialis online lowest price viagra cialis drug cialis vendors viagra online stores erectile dysfunction order viagra in canada buy viagra on line viagra overnight shipping viagra online cheap lowest price for cialis approved viagra pharmacy cialis 10 mg cialis no online prescription cialis purchase cialis from canada order cialis without prescription viagra for sale viagra in australia approved cialis pharmacy buy viagra generic buy sildenafil in spain find viagra no prescription required cialis no prescription buy viagra from us order viagra no prescription required cost viagra purchase viagra without prescription buy cialis no rx cialis cheap cialis internet tablet viagra cheap viagra on internet viagra cost pharmacy viagra cialis soft tab cialis information buy cheap cialis internet purchase cialis overnight delivery cheap cialis without prescription buy viagra no prescription required compare cialis prices buy cheap cialis online overnight cialis where to buy cialis cheap cialis buy cheap viagra internet buy discount cialis viagra buy drug cheap viagra no prescription buy sildenafil citrate buying viagra online buy discount viagra fda approved viagra cialis online stores cheap cialis tablets buy cheapest cialis online cheap viagra tablets order discount viagra sale viagra viagra online cialis for sale cialis soft viagra pharmacy buy cialis from us viagra without a prescription viagra in bangkok

When generating an Excel spreadsheet from XML (I’m using XSLT to transform some original XML into a workbook following Microsoft’s schema), the other day I ran into a problem opening the workbook. It described the error as “Workbook Setting” and referenced a logfile. The logfile contains the following highly informative text:

XML ERROR in Workbook Setting
REASON: Too many tags
FILE: C:\DOCUME~1\d3m853\LOCALS~1\Temp\GenerateCostsheet-44.xls
GROUP:  Workbook
TAG:    Worksheet
ATTRIB: Name
VALUE:  IDC-Subtask1

In typical Microsoft fashion, it tells you almost nothing useful. “Too many tags”? As it turns out, what this means is that there are two worksheets named the same thing, which is Not Allowed. (I don’t know how I could have misunderstood the error message the first time - obviously it’s talking about two worksheet names that are the same!) Name the worksheets something unique, and the problem will go away.

18 vociferations follow:

  1. 11 months, 1 week after the fact, chris responded:

    Thanks! I ran into this crap recently as well

  2. * * * * *
    11 months, 3 weeks after the fact, Scott responded:

    Thanks from here too! You saved my butt. Great detective work.

  3. * * * * *
    1 year, 1 month after the fact, Robert responded:

    Thanks from me as well. I should have remembered it as its not the first time ive come across it.

  4. * * * * *
    1 year, 3 months after the fact, Russ responded:

    Thanks - great help!

  5. * * * * *
    1 year, 4 months after the fact, Kannan responded:

    Before seeing your solution, I am confused and unable to fix the prob.
    Now very happy.
    Regards

  6. * * * * *
    1 year, 7 months after the fact, NGHI responded:

    Yes, that’s correct for one bad defined XMLExcel file.
    But I get this issue when my website export one XMLExcel file with 5 Sheets.

    If I save this file to local storage then open it - this issue never occurs.
    But I chose directly open this file then sometime this issue occur.

    Have you got any idea?

    Thanks & best regards,

  7. * * * * *
    1 year, 9 months after the fact, Pete The Van responded:

    Marvelous work! Exactly my problem too! Thanks.

  8. * * * * *
    1 year, 11 months after the fact, Jason responded:

    I got this error when adding cells to a worksheet but not ‘trimming’ the strings correctly. Adding the cells would work if I did it with a bit of test data statically in the code but when I referenced real data from a row in a dataset I had to ‘trim’ the strings with the VB.NET function ‘.trim’. Perhaps it’s my particular data but it’s worth mentioning.

  9. * * * * *
    2 years, 2 months after the fact, RL responded:

    This happened to me recently with a monsterous spreadsheet that had a duplicate ‘Default’ style (two entries with the same Id tag seems to be the trick). When I exported it, there were two ‘Default’ styles in the tag, causing an error when re-opening the XML file. Removing it from the XML eliminated the problem. Now I just have to figure out how to get rid of this odd style.

  10. * * * * *
    2 years, 2 months after the fact, Adrian responded:

    My errors were:

    XML ERROR in Style
    REASON: Bad Value

    XML ERROR in Style
    REASON: Too many tags

    Solved them by removing the tag at the beginning of the XML.

  11. * * * * *
    2 years, 2 months after the fact, Adrian responded:

    By removing the nameless ‘default’ tag, I meant.

  12. * * * * *
    2 years, 4 months after the fact, Alan Painter responded:

    I ran into something similar from a .xml written by Excel 2003.


    XML ERROR in Style
    REASON: Too many tags
    FILE: MyFileName.xml
    GROUP: Styles
    TAG: Style
    ATTRIB: Name
    VALUE: Normal

    Turned out that two Style elements had the same ss:Name attribute values. Both “Default” and “s21″ had ss:Name=”Normal”.

    I got rid of one of the name attributes ( the one on the Default Style) and Excel read again. Upon re-writing, the second “Normal” was magically changed to “Normal_”.

  13. * * * * *
    2 years, 4 months after the fact, TulsaDev responded:

    I also cam across this error while trying to use the CarlosAg.ExcelXmlWriter.

    I had multiple sheets in a workbook, which were named uniquely, but I then added a style, and style names must be unique for each worksheet as well.

    I ended up appending the worksheet name to the style name.

  14. * * * * *
    2 years, 6 months after the fact, Kunal Bhambhani responded:

    In my case I was getting the follwoing error:-
    XML ERROR in Workbook Setting
    REASON: Too many tags
    FILE: C:\Documents and Settings\mylogin\Local Settings\Temporary Internet Files\Content.IE5\KTEZW9ER\PCAPAnalysis[1].xls
    GROUP: Workbook
    TAG: Worksheet
    ATTRIB: Name
    VALUE: Detailed Report

    It does not come up anymore since I changed the name of the file to a dynamically generated random number in the contentdisposition header of the response. I have a web application and having the same filename in the response header some how gave teh above error.

  15. * * * * *
    2 years, 10 months after the fact, OryK responded:

    Works Y removed

    Ad than works thnaks a lot.

  16. * * * * *
    2 years, 11 months after the fact, Brian responded:

    as per Kunal Bhambhani,

    I was getting the error because of duplicated workbooks with the same name. I fixed it by adding a random number and the users name. (random number alone seemed kinda weird)

  17. * * * * *
    2 years, 11 months after the fact, Matt Winckler responded:

    If you’re appending a number anyway, I would recommend just using a sequential integer (0, 1, 2, 3…n) when generating the workbooks. Random numbers, by definition, are not guaranteed to be unique. You have just as much chance of generating random number N a second time as you did of generating it the first time.

  18. * * * * *
    3 years, 2 months after the fact, Julie responded:

    Wow, thanks!!!!!!!!

    Microsoft has so usefull explanations ;)

React

You must be logged in to post a comment.