|
@@ -2,6 +2,7 @@ BEGIN{
|
|
|
styles=0
|
|
|
in_style=0
|
|
|
rows=-1
|
|
|
+ in_cell=0
|
|
|
}
|
|
|
{
|
|
|
|
|
@@ -28,6 +29,28 @@ BEGIN{
|
|
|
# if(styles<3) styles++
|
|
|
# }
|
|
|
|
|
|
+ if(match($0,"^ *<Cell>.*</Cell>$")){
|
|
|
+ print
|
|
|
+ next
|
|
|
+ }
|
|
|
+ if(match($0,"^ *<Cell>")){
|
|
|
+ ORS=""
|
|
|
+ in_cell=1
|
|
|
+ print
|
|
|
+ next
|
|
|
+ }
|
|
|
+ if(in_cell==1){
|
|
|
+ gsub("^ +"," ",$0)
|
|
|
+ }
|
|
|
+ if(match($0,"</Cell>$")){
|
|
|
+ in_cell=0
|
|
|
+ }
|
|
|
+ if(in_cell==1){
|
|
|
+ ORS=""
|
|
|
+ gsub("\r?\n","",$0)
|
|
|
+ }else{
|
|
|
+ ORS="\n"
|
|
|
+ }
|
|
|
if(match($0,"^ *<Style ")){
|
|
|
in_style=1
|
|
|
if(styles==0){
|