powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / HTML, JavaScript, VBScript, CSS [игнор отключен] [закрыт для гостей] / таблицы в html
11 сообщений из 11, страница 1 из 1
таблицы в html
    #37961542
Андрюхин
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
привет всем. не могу нормально сделать таблицу..надписи у колонок сьезжают вниз, некоторых линий просто не хватает..выложил файл скриншот моей таблички и сразу станет ясно про что я имел ввиду.
...
Рейтинг: 0 / 0
таблицы в html
    #37961544
Андрюхин
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
...
Рейтинг: 0 / 0
таблицы в html
    #37961546
Андрюхин
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
вот код ..результирующий файл открывается икселем:

Код: html
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.
ИмяФайла="forma_666.htm"
  if isblank(ИмяФайла) then
	 ИмяФайла="forma_666.htm"
	 if msgQuestion("Вывод в файл","Имя файла не указано! Вывод в файл "+Каталог+"forma_nn.txt")<>"Yes" then return endif
  endif
  l=Каталог.size()
  if Каталог.substr(l,1)<>"\\" then Каталог=Каталог+"\\" endif
  fname=Каталог+ИмяФайла
  if not isdir(Каталог) then fs.makedir(Каталог) endif
  f.open(fname,"nw")

  f.writeLine("<html xmlns:o=\"urn:schemas-microsoft-com:office:office\"")
  f.writeLine("xmlns:x=\"urn:schemas-microsoft-com:office:excel\">")
  f.writeLine("<HEAD>")
  f.writeLine("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1251\">")
  f.writeLine("<meta name=ProgId content=Excel.Sheet>")
  f.writeLine("<meta name=Generator content=\"Microsoft Excel 11\">")
  f.writeLine("<TITLE>Приложение К договору</TITLE>")


  f.writeLine("<style>")
  f.writeLine("<!--table")
  f.writeLine("	{mso-displayed-decimal-separator:\"\\,\";	mso-displayed-thousand-separator:\" \";}")
  f.writeLine("@page	{mso-header-data:\"&П&\\0022Times New Roman\\,обычный\\0022&8Лист &С\"; margin:.79in .2in .2in .59in; mso-header-margin:.12in; mso-footer-margin:.51in; mso-page-orientation:landscape;}")
  f.writeLine(".font5 {color:windowtext; font-size:10.0pt; font-weight:700; font-style:normal; text-decoration:none; font-family:\"Times New Roman\", serif; mso-font-charset:204;}")
  f.writeLine(".font6 {color:windowtext; font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:\"Times New Roman\", serif; mso-font-charset:204;}")
  f.writeLine("tr {mso-height-source:auto;}")
  f.writeLine("col {mso-width-source:auto;}")
  f.writeLine("br {mso-data-placement:same-cell;}")
  f.writeLine(".style0")
  f.writeLine("	{mso-number-format:General; text-align:general; vertical-align:bottom; white-space:nowrap; mso-rotate:0;")
  f.writeLine("	mso-background-source:auto; mso-pattern:auto; color:windowtext;")
  f.writeLine("	font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none; font-family:\"Times New Roman\", serif; mso-generic-font-family:auto; mso-font-charset:204;")
  f.writeLine("	border:none; mso-protection:locked visible; mso-style-name:Обычный; mso-style-id:0;}")
  f.writeLine("td")
  f.writeLine("	{mso-style-parent:style0; padding-top:1px; padding-right:1px; padding-left:1px; mso-ignore:padding; color:windowtext;")
  f.writeLine("	font-size:10.0pt; font-weight:400; font-style:normal; text-decoration:none;")
  f.writeLine("	font-family:\"Times New Roman\", serif; mso-generic-font-family:auto; mso-font-charset:204; mso-number-format:General;")
  f.writeLine("	text-align:general; vertical-align:bottom; border:none; mso-background-source:auto; mso-pattern:auto; mso-protection:locked visible; white-space:nowrap; mso-rotate:0;}")
  f.writeLine(".xl24")
  f.writeLine("   {mso-style-parent:style0; }")
  f.writeLine(".xl25")
  f.writeLine("	{mso-style-parent:style0; text-align:center; vertical-align:top; border-top:none; border-right:.5pt solid black; border-bottom:.5pt solid black; border-left:none; white-space:normal;}")
  f.writeLine(".xl26")
  f.writeLine("	{mso-style-parent:style0; text-align:center; vertical-align:top; border-top:none; border-right:.5pt hairline black; border-bottom:.5pt hairline black; border-left:.5pt hairline black; white-space:normal;}")
  f.writeLine(".xl28")
  f.writeLine("	{mso-style-parent:style0; mso-number-format:\"Short Date\"; text-align:right; vertical-align:top;	border-top:none; border-right:.5pt hairline black; border-bottom:.5pt hairline black; border-left:none; white-space:normal;}")
  f.writeLine(".xl29")
  f.writeLine("	{mso-style-parent:style0; vertical-align:top; border-top:none; border-right:.5pt hairline black; border-bottom:.5pt hairline black; border-left:none; white-space:normal;}")
  f.writeLine(".xl30")
  f.writeLine("	{mso-style-parent:style0; mso-number-format:\"\\@\"; text-align:right; vertical-align:top; border-top:none; border-right:.5pt hairline black; border-bottom:.5pt hairline black; border-left:none; white-space:normal;}")
  f.writeLine(".xl31")
  f.writeLine("	{mso-style-parent:style0; mso-number-format:Fixed; text-align:right; vertical-align:top; border-top:none; border-right:.5pt hairline black; border-bottom:.5pt hairline black; border-left:none; white-space:normal;}")
  f.writeLine(".xl32")
  f.writeLine("	{mso-style-parent:style0; mso-number-format:General; text-align:right; vertical-align:top; border-top:none; border-right:.5pt hairline black; border-bottom:.5pt solid black; border-left:none; white-space:normal;}")
  f.writeLine(".xl36")
  f.writeLine("	{mso-style-parent:style0; font-weight:700; text-align:center; vertical-align:top; white-space:normal;}")
  f.writeLine(".xl37")
  f.writeLine("	{mso-style-parent:style0; text-align:left; vertical-align:top; border-top:none; border-right:none; border-bottom:.5pt solid black; border-left:none; white-space:normal;}")
  f.writeLine(".xl39")
  f.writeLine("	{mso-style-parent:style0; text-align:center; vertical-align:top; border-top:.5pt solid black; border-right:.5pt solid black; border-bottom:none; border-left:.5pt solid black; white-space:normal;}")
  f.writeLine(".xl42")
  f.writeLine("	{mso-style-parent:style0; text-align:center; vertical-align:top; border-top:.5pt solid black; border-right:none; border-bottom:.5pt solid black; border-left:.5pt solid black; white-space:normal;}")
  f.writeLine(".xl44")
  f.writeLine("	{mso-style-parent:style0; text-align:center;	white-space:normal;}")
  f.writeLine(".xl45")
  f.writeLine("	{mso-style-parent:style0; vertical-align:top; border-top:none; border-right:.5pt hairline black; border-bottom:.5pt solid black; border-left:.5pt solid black; white-space:normal;}")
  f.writeLine(".xl46")
  f.writeLine("	{mso-style-parent:style0; vertical-align:top; border-top:none; border-right:.5pt solid black; border-bottom:.5pt solid black; border-left:none; white-space:normal;}")
  f.writeLine(".xl47")
  f.writeLine("	{mso-style-parent:style0; mso-number-format:Fixed; text-align:right; vertical-align:top; border-top:none; border-right:.5pt hairline black; border-bottom:.5pt solid black; border-left:none; white-space:normal;}")
  f.writeLine(".xl48")
  f.writeLine("	{mso-style-parent:style0; font-weight:700; text-align:left; vertical-align:top; white-space:normal;}")


  f.writeLine("-->")
  f.writeLine("</style>")

  f.writeLine("<!--[if gte mso 9]><xml>")
  f.writeLine(" <x:ExcelWorkbook>")
  f.writeLine("  <x:ExcelWorksheets>")
  f.writeLine("   <x:ExcelWorksheet>")
  f.writeLine("    <x:Name>KnPr0710</x:Name>")
  f.writeLine("    <x:WorksheetOptions>")
  f.writeLine("     <x:Print>")
  f.writeLine("      <x:ValidPrinterInfo/>")
  f.writeLine("      <x:PaperSizeIndex>9</x:PaperSizeIndex>")
  f.writeLine("      <x:Scale>58</x:Scale>")
  f.writeLine("      <x:HorizontalResolution>600</x:HorizontalResolution>")
  f.writeLine("      <x:VerticalResolution>0</x:VerticalResolution>")
  f.writeLine("     </x:Print>")
  f.writeLine("     <x:Zoom>75</x:Zoom>")
  f.writeLine("     <x:PageBreakZoom>75</x:PageBreakZoom>")
  f.writeLine("     <x:Selected/>")
  f.writeLine("     <x:DoNotDisplayGridlines/>")
  f.writeLine("     <x:Panes>")
  f.writeLine("      <x:Pane>")
  f.writeLine("       <x:Number>3</x:Number>")
  f.writeLine("       <x:ActiveRow>1</x:ActiveRow>")
  f.writeLine("       <x:RangeSelection>$A$2:$A$2</x:RangeSelection>")
  f.writeLine("      </x:Pane>")
  f.writeLine("     </x:Panes>")
  f.writeLine("     <x:ProtectContents>False</x:ProtectContents>")
  f.writeLine("     <x:ProtectObjects>False</x:ProtectObjects>")
  f.writeLine("     <x:ProtectScenarios>False</x:ProtectScenarios>")
  f.writeLine("    </x:WorksheetOptions>")
  f.writeLine("   </x:ExcelWorksheet>")
  f.writeLine("  </x:ExcelWorksheets>")
  f.writeLine("  <x:WindowHeight>12405</x:WindowHeight>")
  f.writeLine("  <x:WindowWidth>19020</x:WindowWidth>")
  f.writeLine("  <x:WindowTopX>120</x:WindowTopX>")
  f.writeLine("  <x:WindowTopY>30</x:WindowTopY>")
  f.writeLine("  <x:ProtectStructure>False</x:ProtectStructure>")
  f.writeLine("  <x:ProtectWindows>False</x:ProtectWindows>")
  f.writeLine(" </x:ExcelWorkbook>")
  f.writeLine(" <x:ExcelName>")
  f.writeLine("  <x:Name>Print_Titles</x:Name>")
  f.writeLine("  <x:SheetIndex>1</x:SheetIndex>")
  f.writeLine("  <x:Formula>=KnPr0710!$1:$2</x:Formula>")
  f.writeLine(" </x:ExcelName>")
  f.writeLine("</xml><![endif]-->")


  f.writeLine("</head>")
  f.writeLine("<body link=blue vlink=purple class=xl24>")

  f.writeLine("<table x:str border=0 cellpadding=0 cellspacing=0 width=1622 style='border-collapse: collapse;table-layout:fixed;width:1217pt'>")
  f.writeLine(" <col class=xl24 width=349 style='mso-width-source:userset;mso-width-alt:14890; width:262pt'>")
  f.writeLine(" <col class=xl24 width=77 style='mso-width-source:userset;mso-width-alt:3285; width:58pt'>")
  f.writeLine(" <col class=xl24 width=83 style='mso-width-source:userset;mso-width-alt:3541; width:62pt'>")
  f.writeLine(" <col class=xl24 width=77 style='mso-width-source:userset;mso-width-alt:3285; width:58pt'>")
  f.writeLine(" <col class=xl24 width=71 style='mso-width-source:userset;mso-width-alt:3029; width:53pt'>")
  f.writeLine(" <col class=xl24 width=107 style='mso-width-source:userset;mso-width-alt:4565; width:80pt'>")
  f.writeLine(" <col class=xl24 width=107 style='mso-width-source:userset;mso-width-alt:4565; width:80pt'>")
  f.writeLine(" <col class=xl24 width=107 style='mso-width-source:userset;mso-width-alt:4565; width:80pt'>")
  f.writeLine(" <col class=xl24 width=76 style='mso-width-source:userset;mso-width-alt:3242; width:57pt'>")
  f.writeLine(" <col class=xl24 width=58 style='mso-width-source:userset;mso-width-alt:2474; width:44pt'>")
  f.writeLine(" <col class=xl24 width=33 style='mso-width-source:userset;mso-width-alt:1408; width:25pt'>")
  f.writeLine(" <col class=xl24 width=40 style='mso-width-source:userset;mso-width-alt:1706; width:30pt'>")
  f.writeLine(" <col class=xl24 width=41 style='mso-width-source:userset;mso-width-alt:1749; width:31pt'>")
  f.writeLine(" <col class=xl24 width=349 style='mso-width-source:userset;mso-width-alt:14890; width:262pt'>")


 f.writeLine("<tr><td colspan=12 class=xl36>&nbsp;</td>")
 f.writeLine("<td colspan=2  class=xl48><FONT SIZE=+1>Приложение №6 <BR>К договору теплоснабжения № "+string(tc."Договор N")+iif(isblank(tc."Договор Дата")," "," от "+format("D9",tc."Договор Дата"))+"</Font></td></tr>")
 ;f.writeLine("<tr><td colspan=14 class=xl37 >Код плательщика: <font class=\"font6\"><B>"+string(tc."КодП")+"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +tc."Наименование"+"</B></font></td></tr>")
  f.writeLine("<tr><td colspan=14 class=xl37 > Наименование потребителя: <font class=\"font6\"><B>"+tc."Наименование")


  f.writeLine(" <tr>")
  f.writeLine("  <td rowspan=2 class=xl39 style='border-bottom:.5pt solid black; border-top:none'>Адрес объекта</td>")
  f.writeLine("  <td rowspan=2 class=xl39 style='border-bottom:.5pt solid black; border-top:none'>Назначение объекта</td>")
  f.writeLine("  <td rowspan=2 class=xl39 style='border-bottom:.5pt solid black; border-top:none'>Год постройки</td>")
  f.writeLine("  <td colspan=2 class=x142 style='border-bottom:.5pt solid black; border-top:none'>Площадь, кв.м</td>")
  f.writeLine("  <td rowspan=2 class=xl39 style='border-bottom:.5pt solid black; border-top:none'>Коэфф-т потерь тепла труб-дами ГВС</td>")
  f.writeLine("  <td rowspan=2 class=x139 style='border-bottom:.5pt solid black; border-top:none'>Эт.дома</td>")
  f.writeLine("  <td rowspan=2 class=xl39 style='border-bottom:.5pt solid black; border-top:none'>Норматив по отоплению жилых помещений Гкал/кв.м</td>")
  f.writeLine("  <td rowspan=2 class=xl39 style='border-bottom:.5pt solid black; border-top:none'>Норматив по отоплению на ОДН Гкал/кв.м</td>")
  f.writeLine("  <td rowspan=2 class=xl39 style='border-bottom:.5pt solid black; border-top:none'>Норматив по горячему водосн-ю на 1 человека куб.м</td>")
  f.writeLine("  <td rowspan=2 class=xl39 style='border-bottom:.5pt solid black; border-top:none'>Норматив по горячему водосн-ю на ОДН куб.м/кв.м</td>")
  f.writeLine("  <td rowspan=2 class=xl39 style='border-bottom:.5pt solid black; border-top:none'>Наличие коллективного приборов учета</td>")


  f.writeLine(" </tr>")
  f.writeLine(" <tr>")
  f.writeLine("  <td class=x139>Жилых помещений</td>")
  f.writeLine("  <td class=x139>Помещений, входящих в состав общего имущества в многоквартирном доме(ОДН)</td>")
  f.writeLine(" </tr>")

    scan tc:
   f.writeline("<tr>")
   f.writeline("<td rowspan=3 class=xl45>"+tc."АдресО"+"</TD>")
   f.writeline("<td rowspan=3 class=xl45>"+tc."Назначение"+"</TD>")
   f.writeline("<td class=x145>"+string(LongInt(tc."Год постройки"))+"</TD>")
   f.writeline("<td rowspan=3 class=xl32 x:num="+format("W.1",tc."Площадь Жил")+">"+format("W.1",tc."Площадь Жил")+"</TD>")
   f.writeline("<td rowspan=3 class=xl32 x:num="+format("W.1",tc."Площадь Общ")+">"+format("W.1",tc."Площадь Общ")+"</TD>")
   f.writeline("<td class=xl29>"+string(LongInt(tc."Этажей"))+"</TD>")
   f.writeline("<td class=xl29>"+string(LongInt(tc."НормативО"))+"</TD>")
   f.writeline("<td class=xl29>"+string(LongInt(tc."Норма расхода"))+"</TD>")
   f.writeline("<td class=xl29>"+string(LongInt(tc."Норм ОДН ГВС"))+"</TD>")
   f.writeline("</TR>")
  endscan
  tc.close()
  q.removetable(":PRIV:$UOBJ$")
  delete(":PRIV:$UOBJ$")


  f.writeline("<tr>")
  f.writeline("<td class=xl45><B>Итого</B></TD>")
  f.writeline("<td class=xl47>&nbsp;</TD>")
  f.writeline("<td class=xl47>&nbsp;</TD>")
  f.writeline("<td class=xl47>&nbsp;</TD>")
  f.writeline("<td class=xl47>&nbsp;</TD>")
  f.writeline("<td class=xl47>&nbsp;</TD>")
  f.writeline("<td class=xl46>&nbsp;</TD>")
  f.writeline("</TR>")


  f.writeLine("<tr><td colspan=12 class=xl36>&nbsp;</td></tr>")
  f.writeLine("<tr><td colspan=12 class=xl36>&nbsp;</td></tr>")
  f.writeLine("<tr><td colspan=12 class=xl36>&nbsp;</td></tr>")

  f.writeLine("<tr><td colspan=6 class=xl36><FONT SIZE=+2>Энергоснабжающая организация</FONT></td>")
  f.writeLine("<td colspan=8 class=xl36><FONT SIZE=+2>Абонент"+fill("&nbsp;",21)+"</FONT></td></tr>")
  f.writeLine("<tr><td colspan=12 class=xl36>&nbsp;</td></tr>")
  f.writeLine("<tr><td colspan=12 class=xl36>&nbsp;</td></tr>")
  f.writeLine("<tr><td colspan=12 class=xl36>&nbsp;</td></tr>")

  f.writeLine("<tr><td colspan=6 class=xl36><FONT SIZE=+2>______________________________</FONT></td>")
  f.writeLine("<td colspan=80000000000000 class=xl36><FONT SIZE=+2>______________________________</FONT></td></tr>")





  f.writeLine(" <![if supportMisalignedColumns]>")
  f.writeLine(" <tr height=0 style='display:none'>")
  f.writeLine("  <td width=40 style='width:30pt'></td>")
  f.writeLine("  <td width=120 style='width:90pt'></td>")
  f.writeLine("  <td width=86 style='width:65pt'></td>")
  f.writeLine("  <td width=415 style='width:311pt'></td>")
  f.writeLine("  <td width=101 style='width:76pt'></td>")
  f.writeLine("  <td width=100 style='width:75pt'></td>")
  f.writeLine("  <td width=59 style='width:44pt'></td>")
  f.writeLine("  <td width=92 style='width:69pt'></td>")
  f.writeLine("  <td width=99 style='width:74pt'></td>")
  f.writeLine("  <td width=91 style='width:68pt'></td>")
  f.writeLine("  <td width=65 style='width:49pt'></td>")
  f.writeLine("  <td width=44 style='width:33pt'></td>")
  f.writeLine("  <td width=69 style='width:52pt'></td>")
  f.writeLine("  <td width=96 style='width:72pt'></td>")
  f.writeLine("  <td width=82 style='width:62pt'></td>")
  f.writeLine("  <td width=63 style='width:47pt'></td>")
  f.writeLine(" </tr>")
  f.writeLine(" <![endif]>")

  f.writeLine("</Table>")
  f.writeLine("</BODY>")
  f.writeLine("</HTML>")
  f.close()
...
Рейтинг: 0 / 0
таблицы в html
    #37961547
Андрюхин
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
а хотелось бы аккуратную таблицу....типа такой:
...
Рейтинг: 0 / 0
таблицы в html
    #37961549
Андрюхин
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Андрюхин,
...
Рейтинг: 0 / 0
таблицы в html
    #37961565
Фотография krvsa
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Андрюхинвот код ..результирующий файл открывается икселем
Это раздел про HTML...
...
Рейтинг: 0 / 0
таблицы в html
    #37961570
Андрюхин
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
krvsa,

ясно дело, что не в разделе паскаля..тут код надо подправить
...
Рейтинг: 0 / 0
таблицы в html
    #37961573
Андрюхин
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
krvsa,

html код это.
...
Рейтинг: 0 / 0
таблицы в html
    #37961857
Фотография krvsa
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Андрюхинтут код надо подправить
Сколько платишь?
...
Рейтинг: 0 / 0
таблицы в html
    #37961861
Фотография Antonariy
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Андрюхина хотелось бы аккуратную таблицу....типа такой:Делай экселевскую таблицу, а не html, и будет щастье.
...
Рейтинг: 0 / 0
таблицы в html
    #37961880
Андрюхин
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Antonariy,

оказывается сначала данные в эксель попадают а потом с икселя в хтмл
...
Рейтинг: 0 / 0
11 сообщений из 11, страница 1 из 1
Форумы / HTML, JavaScript, VBScript, CSS [игнор отключен] [закрыт для гостей] / таблицы в html
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]