04.02.2014, 13:13. Показов 2445. Ответов 3
Здравствуйте, товарищи форумчане!
Передо мной встала задача распарсить расписание для группы, оно находится
на сайте! Но я решил не связываться с парсингом данных через сайт, т.к. можно все это дело экспортировать в файл (кнопочка снизу). Открыв этот файл через excel - который плюется на несовместимость с форматом, перед нами предстает таблица с нужными данными.
Попытался распарсить данный файл через Apache POI, но он начал ругаться опять же на некорректность файла, погуглив понял, что может и не xls документ это вовсе! Открыл этот файл через обычный редактор, и увидел xml, вот такой:
Кликните здесь для просмотра всего текста
| XML |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
| <?xml version="1.0" encoding="UTF-8"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<Author>Customer</Author>
<LastAuthor>Customer</LastAuthor>
<Created>2009-08-11T12:19:25Z</Created>
<Company>Организация</Company>
<Version>11.8036</Version>
</DocumentProperties>
<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
<WindowHeight>9720</WindowHeight>
<WindowWidth>15195</WindowWidth>
<WindowTopX>480</WindowTopX>
<WindowTopY>45</WindowTopY>
<ProtectStructure>False</ProtectStructure>
<ProtectWindows>False</ProtectWindows>
</ExcelWorkbook>
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom" />
<Borders />
<Font ss:FontName="Arial Cyr" x:CharSet="204" />
<Interior />
<NumberFormat />
<Protection />
</Style>
<Style ss:ID="s22">
<Alignment ss:Horizontal="Center" ss:Vertical="Bottom" />
<Borders>
<Border ss:Position="Bottom" ss:LineStyle="Continuous"
ss:Weight="2" />
</Borders>
<Font ss:FontName="Arial Cyr" x:CharSet="204" ss:Size="12"
ss:Bold="1" />
</Style>
<Style ss:ID="s24">
<Borders>
<Border ss:Position="Bottom" ss:LineStyle="Continuous"
ss:Weight="1" />
<Border ss:Position="Left" ss:LineStyle="Continuous"
ss:Weight="2" />
<Border ss:Position="Right" ss:LineStyle="Continuous"
ss:Weight="1" />
<Border ss:Position="Top" ss:LineStyle="Continuous"
ss:Weight="2" />
</Borders>
</Style>
<Style ss:ID="s25">
<Alignment ss:Horizontal="Center" ss:Vertical="Bottom" />
<Borders>
<Border ss:Position="Bottom" ss:LineStyle="Continuous"
ss:Weight="1" />
<Border ss:Position="Left" ss:LineStyle="Continuous"
ss:Weight="1" />
<Border ss:Position="Right" ss:LineStyle="Continuous"
ss:Weight="1" />
<Border ss:Position="Top" ss:LineStyle="Continuous"
ss:Weight="2" />
</Borders>
<Font ss:FontName="Arial Cyr" x:CharSet="204" ss:Size="12"
ss:Bold="1" />
</Style>
<Style ss:ID="s26">
<Alignment ss:Horizontal="Center" ss:Vertical="Bottom" />
<Borders>
<Border ss:Position="Bottom" ss:LineStyle="Continuous"
ss:Weight="1" />
<Border ss:Position="Left" ss:LineStyle="Continuous"
ss:Weight="1" />
<Border ss:Position="Right" ss:LineStyle="Continuous"
ss:Weight="2" />
<Border ss:Position="Top" ss:LineStyle="Continuous"
ss:Weight="2" />
</Borders>
<Font ss:FontName="Arial Cyr" x:CharSet="204" ss:Size="12"
ss:Bold="1" />
</Style>
<Style ss:ID="s27">
<Alignment ss:Horizontal="Center" ss:Vertical="Center"
ss:WrapText="1" />
<Borders>
<Border ss:Position="Bottom" ss:LineStyle="Continuous"
ss:Weight="1" />
<Border ss:Position="Left" ss:LineStyle="Continuous"
ss:Weight="2" />
<Border ss:Position="Right" ss:LineStyle="Continuous"
ss:Weight="1" />
<Border ss:Position="Top" ss:LineStyle="Continuous"
ss:Weight="1" />
</Borders>
<Font ss:FontName="Arial Cyr" x:CharSet="204" ss:Size="12"
ss:Bold="1" />
</Style>
<Style ss:ID="s28">
<Alignment ss:Horizontal="Center" ss:Vertical="Center"
ss:WrapText="1" />
<Borders>
<Border ss:Position="Bottom" ss:LineStyle="Continuous"
ss:Weight="1" />
<Border ss:Position="Left" ss:LineStyle="Continuous"
ss:Weight="1" />
<Border ss:Position="Right" ss:LineStyle="Continuous"
ss:Weight="1" />
<Border ss:Position="Top" ss:LineStyle="Continuous"
ss:Weight="1" />
</Borders>
<Font ss:FontName="Arial Cyr" x:CharSet="204" ss:Size="8" />
<NumberFormat ss:Format="@" />
</Style>
<Style ss:ID="s29">
<Alignment ss:Horizontal="Center" ss:Vertical="Center"
ss:WrapText="1" />
<Borders>
<Border ss:Position="Bottom" ss:LineStyle="Continuous"
ss:Weight="2" />
<Border ss:Position="Left" ss:LineStyle="Continuous"
ss:Weight="2" />
<Border ss:Position="Right" ss:LineStyle="Continuous"
ss:Weight="1" />
<Border ss:Position="Top" ss:LineStyle="Continuous"
ss:Weight="1" />
</Borders>
<Font ss:FontName="Arial Cyr" x:CharSet="204" ss:Size="12"
ss:Bold="1" />
</Style>
</Styles>
<Worksheet ss:Name="Лист1">
<Names>
<NamedRange ss:Name="Print_Area" ss:RefersTo="=Лист1!R2C1:R10C7" />
</Names>
<Table ss:ExpandedColumnCount="7" ss:ExpandedRowCount="10"
x:FullColumns="1" x:FullRows="1">
<Column ss:AutoFitWidth="0" ss:Width="63" />
<Column ss:AutoFitWidth="0" ss:Width="140.25" ss:Span="5" />
<Row ss:AutoFitHeight="0" ss:Height="21">
<Cell ss:MergeAcross="6" ss:StyleID="s22">
<Data ss:Type="String">Дневное отделение: 151 группа</Data>
</Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="16.5">
<Cell ss:StyleID="s24">
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s25">
<Data ss:Type="String">Понедельник</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s25">
<Data ss:Type="String">Вторник</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s25">
<Data ss:Type="String">Среда</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s25">
<Data ss:Type="String">Четверг</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s25">
<Data ss:Type="String">Пятница</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s26">
<Data ss:Type="String">Суббота</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="144">
<Cell ss:StyleID="s27">
<Data ss:Type="String">08:20- 09:50</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">знам.лек.*Математический анализ
Сахно
Л. В.
12корпус ауд.312
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">лек.*Физика
Машников В. .
12корпус
ауд.229
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">лек.*Экономика программной
инженерии
Самойлов В. Г.
12корпус ауд.312
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">пр.*Физика
Машников В. .
3 корп.
ауд.48
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">чис.лек.*Алгебра и геометрия
Букушева
А. В.
12корпус ауд.333
знам.пр.*Алгебра и
геометрия
Букушева А. В.
12корпус ауд.312
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="144">
<Cell ss:StyleID="s27">
<Data ss:Type="String">10:00- 11:35</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">пр.*Математический анализ
Сахно Л.
В.
12корпус ауд.312
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">лек.*Алгебра и геометрия
Букушева А.
В.
12корпус ауд.333
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">чис.лек.*Информатика и
программирование
Иванова А. С.
12корпус ауд.303
знам.пр.*Информатика и программирование
Иванова А.
С.
12корпус ауд.303
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">пр.*Алгебра и геометрия
Букушева А.
В.
12корпус ауд.312
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">пр.*Физическая культура
Вантеева В.
Л.
12корпус Спортзал
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="144">
<Cell ss:StyleID="s27">
<Data ss:Type="String">12:05- 13:40</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">пр.*Физическая культура
Вантеева В.
Л.
12корпус Спортзал
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">пр.*История
Зайцев М. В.
12корпус
ауд.302
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">пр.*Информатика и программирование
2
под.
Кондратова Ю. Н.
12корпус ауд.418б
пр.*Информатика и программирование
1 под.
Иванова А.
С.
12корпус ауд.418а
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="144">
<Cell ss:StyleID="s27">
<Data ss:Type="String">13:50- 15:25</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">пр.*англ.яз.станд.
анг.ст.9
Карпец
Е. В.
12корпус ауд.313
пр.*англ.яз.станд.
англ.ст.10
Павлова О.
В.
12корпус ауд.302
пр.*англ.яз.станд.
анг.ст.7
Обликова М.
И.
12корпус ауд.225В
пр.*англ.яз.станд.
анг.ст.8
Писаренко А.
Н.
12корпус ауд.229
пр.*переводчики
перев,3под
Шилова С. А.
12корпус
ауд.125
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">лек.*История
Зайцев М. В.
12корпус
ауд.333
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">пр.*англ.яз.станд.
анг.ст.8
Писаренко
А. Н.
12корпус ауд.229
пр.*англ.яз.станд.
анг.ст.9
Карпец Е. В.
12корпус
ауд.313
пр.*англ.яз.станд.
анг.ст.7
Обликова М.
И.
12корпус ауд.225В
пр.*англ.яз.станд.
англ.ст.10
Павлова О.
В.
12корпус ауд.217
пр.*переводчики
перев,3под
Шилова С. А.
12корпус
ауд.125
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="144">
<Cell ss:StyleID="s27">
<Data ss:Type="String">15:35- 17:10</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="144">
<Cell ss:StyleID="s27">
<Data ss:Type="String">17:20- 18:40</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">лек.*переводчики
перев.
Шилова С.
А.
12корпус ауд.425
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="144">
<Cell ss:StyleID="s27">
<Data ss:Type="String">18:45- 20:10</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="144">
<Cell ss:StyleID="s29">
<Data ss:Type="String">20:10- 21:30</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<PageMargins x:Bottom="0.984251969" x:Left="0.78740157499999996"
x:Right="0.78740157499999996" x:Top="0.984251969" />
</PageSetup>
<Print>
<ValidPrinterInfo />
<PaperSizeIndex>9</PaperSizeIndex>
<HorizontalResolution>300</HorizontalResolution>
<VerticalResolution>300</VerticalResolution>
</Print>
<Selected />
<Panes>
<Pane>
<Number>3</Number>
<RangeSelection>R1C1:R1C7</RangeSelection>
</Pane>
</Panes>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
<Worksheet ss:Name="Лист2">
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<PageMargins x:Bottom="0.984251969" x:Left="0.78740157499999996"
x:Right="0.78740157499999996" x:Top="0.984251969" />
</PageSetup>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
<Worksheet ss:Name="Лист3">
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<PageSetup>
<PageMargins x:Bottom="0.984251969" x:Left="0.78740157499999996"
x:Right="0.78740157499999996" x:Top="0.984251969" />
</PageSetup>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
</Workbook> |
|
Мне же нужно выделить только вот эту часть:
Кликните здесь для просмотра всего текста
| XML |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
| <Table ss:ExpandedColumnCount="7" ss:ExpandedRowCount="10"
x:FullColumns="1" x:FullRows="1">
<Column ss:AutoFitWidth="0" ss:Width="63" />
<Column ss:AutoFitWidth="0" ss:Width="140.25" ss:Span="5" />
<Row ss:AutoFitHeight="0" ss:Height="21">
<Cell ss:MergeAcross="6" ss:StyleID="s22">
<Data ss:Type="String">Дневное отделение: 151 группа</Data>
</Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="16.5">
<Cell ss:StyleID="s24">
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s25">
<Data ss:Type="String">Понедельник</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s25">
<Data ss:Type="String">Вторник</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s25">
<Data ss:Type="String">Среда</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s25">
<Data ss:Type="String">Четверг</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s25">
<Data ss:Type="String">Пятница</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s26">
<Data ss:Type="String">Суббота</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="144">
<Cell ss:StyleID="s27">
<Data ss:Type="String">08:20- 09:50</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">знам.лек.*Математический анализ
Сахно
Л. В.
12корпус ауд.312
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">лек.*Физика
Машников В. .
12корпус
ауд.229
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">лек.*Экономика программной
инженерии
Самойлов В. Г.
12корпус ауд.312
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">пр.*Физика
Машников В. .
3 корп.
ауд.48
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">чис.лек.*Алгебра и геометрия
Букушева
А. В.
12корпус ауд.333
знам.пр.*Алгебра и
геометрия
Букушева А. В.
12корпус ауд.312
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="144">
<Cell ss:StyleID="s27">
<Data ss:Type="String">10:00- 11:35</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">пр.*Математический анализ
Сахно Л.
В.
12корпус ауд.312
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">лек.*Алгебра и геометрия
Букушева А.
В.
12корпус ауд.333
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">чис.лек.*Информатика и
программирование
Иванова А. С.
12корпус ауд.303
знам.пр.*Информатика и программирование
Иванова А.
С.
12корпус ауд.303
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">пр.*Алгебра и геометрия
Букушева А.
В.
12корпус ауд.312
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">пр.*Физическая культура
Вантеева В.
Л.
12корпус Спортзал
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="144">
<Cell ss:StyleID="s27">
<Data ss:Type="String">12:05- 13:40</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">пр.*Физическая культура
Вантеева В.
Л.
12корпус Спортзал
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">пр.*История
Зайцев М. В.
12корпус
ауд.302
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">пр.*Информатика и программирование
2
под.
Кондратова Ю. Н.
12корпус ауд.418б
пр.*Информатика и программирование
1 под.
Иванова А.
С.
12корпус ауд.418а
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="144">
<Cell ss:StyleID="s27">
<Data ss:Type="String">13:50- 15:25</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">пр.*англ.яз.станд.
анг.ст.9
Карпец
Е. В.
12корпус ауд.313
пр.*англ.яз.станд.
англ.ст.10
Павлова О.
В.
12корпус ауд.302
пр.*англ.яз.станд.
анг.ст.7
Обликова М.
И.
12корпус ауд.225В
пр.*англ.яз.станд.
анг.ст.8
Писаренко А.
Н.
12корпус ауд.229
пр.*переводчики
перев,3под
Шилова С. А.
12корпус
ауд.125
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">лек.*История
Зайцев М. В.
12корпус
ауд.333
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">пр.*англ.яз.станд.
анг.ст.8
Писаренко
А. Н.
12корпус ауд.229
пр.*англ.яз.станд.
анг.ст.9
Карпец Е. В.
12корпус
ауд.313
пр.*англ.яз.станд.
анг.ст.7
Обликова М.
И.
12корпус ауд.225В
пр.*англ.яз.станд.
англ.ст.10
Павлова О.
В.
12корпус ауд.217
пр.*переводчики
перев,3под
Шилова С. А.
12корпус
ауд.125
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="144">
<Cell ss:StyleID="s27">
<Data ss:Type="String">15:35- 17:10</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="144">
<Cell ss:StyleID="s27">
<Data ss:Type="String">17:20- 18:40</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String">лек.*переводчики
перев.
Шилова С.
А.
12корпус ауд.425
</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="144">
<Cell ss:StyleID="s27">
<Data ss:Type="String">18:45- 20:10</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="144">
<Cell ss:StyleID="s29">
<Data ss:Type="String">20:10- 21:30</Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
<Cell ss:StyleID="s28">
<Data ss:Type="String"></Data>
<NamedCell ss:Name="Print_Area" />
</Cell>
</Row>
</Table> |
|
Нужные мне данные находятся в Data, пытался парсить xml
вот этому примеру, но возникли следующие проблемы:
1) Если в Data данных нет, то парсер их пропускает, а мне же надо знать, что эта клетка пуста
2) В документе встречаются символы
и * если при парсинге оставить их в документе, то некотороые данные не считываются или считываются не до конца, убрал их, теперь в строке между данными куча пробелов
Хотел бы узнать, как лучше произвести процесс парсинга, ибо сталкиваюсь с этим впервые
Насколько я понял есть 2 варианта парсинга - SAX и DOM, первый делает все "налету", второй же строит дерево и мы уже работаем с ним.
Может я как-то не так пробовал и все это можно провернуть через POI?