<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=476546</guid>
        <pubDate>Wed, 06 Oct 2004 11:58:07 +0000</pubDate>
        <title>Вставка формулы в Excel</title>
        <link>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=476546</link>
        <description><![CDATA[rapido: Вот так работает:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">ASheetRef.Range[CellsToRange(5,3,45,PeriodCount + 2)].NumberFormat:=&#39;# ###,0;(# ###,0);0,0&#39;;</div><div class="code_line">ASheetRef.Range[CellsToRange(50,3,86,PeriodCount + 2)].NumberFormat:=&#39;# ###,0;(# ###,0);0,0&#39;;</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>]]></description>
        <author>rapido</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=475077</guid>
        <pubDate>Tue, 05 Oct 2004 02:12:51 +0000</pubDate>
        <title>Вставка формулы в Excel</title>
        <link>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=475077</link>
        <description><![CDATA[Mischka: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <span class='tag-quote__quote-info'>Jureth, 4.10.04, 08:46</span><div class='quote '>Переустановил бы Офис - ради разработки приложения можно и попотеть немного. </div></div><br>
офис можно и <strong class='tag-b'>до</strong>установить, не удаляя его полностью :)]]></description>
        <author>Mischka</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=474757</guid>
        <pubDate>Mon, 04 Oct 2004 14:53:26 +0000</pubDate>
        <title>Вставка формулы в Excel</title>
        <link>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=474757</link>
        <description><![CDATA[rapido: Понял. Еще раз спасибо.]]></description>
        <author>rapido</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=474143</guid>
        <pubDate>Mon, 04 Oct 2004 02:46:00 +0000</pubDate>
        <title>Вставка формулы в Excel</title>
        <link>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=474143</link>
        <description><![CDATA[Jureth: 1. Не знаю - не делал.<br>
2. Это свойство - ReadOnly, установить его можно только при сохранении книги (WBRef.SaveAs)<br>
<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>У меня нету этой чертовой справки ВБ</div></div> Переустановил бы Офис - ради разработки приложения можно и попотеть немного.]]></description>
        <author>Jureth</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=472611</guid>
        <pubDate>Fri, 01 Oct 2004 13:44:27 +0000</pubDate>
        <title>Вставка формулы в Excel</title>
        <link>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=472611</link>
        <description><![CDATA[rapido: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <span class='tag-quote__quote-info'>Jureth, 29.09.04, 05:09</span><div class='quote '>Попробуй Sheet.Calculate (или Range.Calculate) - он должен форсировать пересчет данных, но я не проверял. </div></div><br>
<br>
Работает.<br>
<br>
И еще два вопроса.<br>
1. Как установить формат ячеек, то есть:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">ASheetRef.Range[&#39;A1:A86&#39;].NumberFormat:=&#39;# ###0.0&#39;;</div></ol></div></div></div></div><br>
<br>
2. И как присвоить имя книге:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;ExcelApp:=CreateOleObject(&#39;Excel.Application&#39;);</div><div class="code_line">&nbsp;&nbsp; &nbsp;ExcelApp.Visible:=true;</div><div class="code_line">&nbsp;&nbsp; &nbsp;WBRef:=ExcelApp.Workbooks.Add;</div><div class="code_line">&nbsp;&nbsp; &nbsp;WBRef.Name:=&#39;Some name&#39;;</div></ol></div></div></div></div><br>
<br>
<br>
Вылетает ошибка и в первом и во втором случае. Искал в инете - ничего толкового не могу найти. У меня нету этой чертовой справки ВБ.]]></description>
        <author>rapido</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=470011</guid>
        <pubDate>Wed, 29 Sep 2004 02:09:35 +0000</pubDate>
        <title>Вставка формулы в Excel</title>
        <link>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=470011</link>
        <description><![CDATA[Jureth: Попробуй Sheet.Calculate (или Range.Calculate) - он должен форсировать пересчет данных, но я не проверял.]]></description>
        <author>Jureth</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=469972</guid>
        <pubDate>Tue, 28 Sep 2004 22:29:47 +0000</pubDate>
        <title>Вставка формулы в Excel</title>
        <link>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=469972</link>
        <description><![CDATA[rapido: Ураааааа&#33; Работает&#33;<br>
Сделал так:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">procedure DrawCellBorders(var ASheetRef: Variant);</div><div class="code_line">const</div><div class="code_line">&nbsp;&nbsp; &nbsp;EDGE_LEFT &nbsp; &nbsp; &nbsp;= 7;</div><div class="code_line">&nbsp;&nbsp; &nbsp;EDGE_TOP &nbsp; &nbsp; &nbsp; = 8;</div><div class="code_line">&nbsp;&nbsp; &nbsp;EDGE_BOTTOM &nbsp; &nbsp;= 9;</div><div class="code_line">&nbsp;&nbsp; &nbsp;EDGE_RIGHT &nbsp; &nbsp; = 10;</div><div class="code_line">&nbsp;&nbsp; &nbsp;INNER_VERTICAL = 11;</div><div class="code_line">&nbsp;&nbsp; &nbsp;INNER_HOR &nbsp; &nbsp; &nbsp;= 12;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;LINE_STYLE &nbsp; &nbsp; = 1;</div><div class="code_line">&nbsp;&nbsp; &nbsp;LINE_WIDTH &nbsp; &nbsp; = 2;</div><div class="code_line">&nbsp;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;ASheetRef.Range[CellsToRange(1,1,86,PeriodCount + 2)].Borders[INNER_VERTICAL].Weight:=LINE_WIDTH;</div><div class="code_line">&nbsp;&nbsp; &nbsp;ASheetRef.Range[CellsToRange(1,1,86,PeriodCount + 2)].Borders[INNER_VERTICAL].LineStyle:=LINE_STYLE;</div><div class="code_line">&nbsp;&nbsp; &nbsp;ASheetRef.Range[CellsToRange(1,1,86,PeriodCount + 2)].Borders[INNER_HOR].Weight:=LINE_WIDTH;</div><div class="code_line">&nbsp;&nbsp; &nbsp;ASheetRef.Range[CellsToRange(1,1,86,PeriodCount + 2)].Borders[INNER_HOR].LineStyle:=LINE_STYLE;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;ASheetRef.Range[CellsToRange(1,1,86,PeriodCount + 2)].Borders[EDGE_TOP].Weight:=LINE_WIDTH;</div><div class="code_line">&nbsp;&nbsp; &nbsp;ASheetRef.Range[CellsToRange(1,1,86,PeriodCount + 2)].Borders[EDGE_BOTTOM].LineStyle:=LINE_STYLE;</div><div class="code_line">&nbsp;&nbsp; &nbsp;ASheetRef.Range[CellsToRange(1,1,86,PeriodCount + 2)].Borders[EDGE_LEFT].Weight:=LINE_WIDTH;</div><div class="code_line">&nbsp;&nbsp; &nbsp;ASheetRef.Range[CellsToRange(1,1,86,PeriodCount + 2)].Borders[EDGE_RIGHT].LineStyle:=LINE_STYLE;</div><div class="code_line">end;//DrawCellBorders</div></ol></div></div></div></div><br>
<br>
Прорисовывает почти мгновенно. Спасибо Jureth.<br>
<br>
Формула тоже вставляется. Только есть небольшая проблема.<br>
Как обновить значение в ячейке с автосумой? А то в ней прописывает 0. А у меня в сумируемых ячейках уже есть значения и их то и надо просумировать и показать пользователю.]]></description>
        <author>rapido</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=469046</guid>
        <pubDate>Tue, 28 Sep 2004 05:15:16 +0000</pubDate>
        <title>Вставка формулы в Excel</title>
        <link>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=469046</link>
        <description><![CDATA[Jureth: Этот вариант у меня сработал:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">aSheetRef.Cells[19,3].FormulaLocal:=&#39;=СУММ(C6;C11;C14:C18)&#39;;</div></ol></div></div></div></div><br>
Процедуры, генерирующая строку:<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">//Вспомогательная - генерирует буквенное представление столбца по его номеру</div><div class="code_line">function GetCol(Col: integer): String;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;if Col&#60;27 then</div><div class="code_line">&nbsp;&nbsp; &nbsp;Result := Chr(Col+64)</div><div class="code_line">&nbsp;&nbsp;else</div><div class="code_line">&nbsp;&nbsp; &nbsp;Result := Chr((Col div 26)+64)+ Chr((Col mod 26)+64)</div><div class="code_line">end;</div><div class="code_line">//Возвращает строку типа &#39;A1&#39; для одной ячейки</div><div class="code_line">function CellsToRange(Row1, Col1: Integer): String; overload;</div><div class="code_line">var</div><div class="code_line">&nbsp;&nbsp;S : String;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;S := GetCol(Col1)+IntToStr(Row1);</div><div class="code_line">&nbsp;&nbsp;Result := S;</div><div class="code_line">end;</div><div class="code_line">//Возвращает строку типа &#39;A1:C5&#39; для диапазона (Row1, Col1 - TopLeft угол, Row2, Col2 - RightBottom)</div><div class="code_line">function CellsToRange(Row1, Col1, Row2, Col2: Integer): String; overload;</div><div class="code_line">var</div><div class="code_line">&nbsp;&nbsp;S : String;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;S := GetCol(Col1)+IntToStr(Row1)+&#39;:&#39;+ GetCol(Col2)+ IntToStr(Row2);</div><div class="code_line">&nbsp;&nbsp;Result := S;</div><div class="code_line">end;</div></ol></div></div></div></div><br>
юзается это примерно так:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;Sheet.Range[CellsToRange(1,1,15,15)].Borders[11].Weight := 2;</div><div class="code_line">&nbsp;&nbsp;Sheet.Range[CellsToRange(1,1,15,15)].Borders[11].LineStyle := 4</div></ol></div></div></div></div>Пока всё.]]></description>
        <author>Jureth</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=468983</guid>
        <pubDate>Tue, 28 Sep 2004 02:31:36 +0000</pubDate>
        <title>Вставка формулы в Excel</title>
        <link>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=468983</link>
        <description><![CDATA[Jureth: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>С формулами все равно не получается.</div></div>Она скорее всего матюгается на &#39;SUM&#39; - эту функцию она не понимает даже если её ввести руками (#ИМЯ?).<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '>Пробовал. Выигрыш незначительный.</div></div> Тогда можно попробовать сначала сгенерировать строку из адресов ячеек для Range, а потом проставить Borders для полученного диапазона(алгоритм сейчас не дам - занят, но к вечеру или завтра - попробую). Если и это не поможет, то тогда смирись - Excel вообще штука не быстрая.]]></description>
        <author>Jureth</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=468741</guid>
        <pubDate>Mon, 27 Sep 2004 16:52:29 +0000</pubDate>
        <title>Вставка формулы в Excel</title>
        <link>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=468741</link>
        <description><![CDATA[rapido: Спасибо всем за ответы.<br>
<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <span class='tag-quote__quote-info'>anika, 26.09.04, 01:51</span><div class='quote '>По поводу второго могу порекомендовать убрать обновление экрана перед выполнением кода (_WordDoc как TWordDocument):<br>
<br>
_WordDoc.Application.ScreenUpdating:=false;<br>
<br>
<br>
а самом конце обратно соответственно в true </div></div><br>
<br>
<div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <span class='tag-quote__quote-info'>Jureth, 27.09.04, 07:05</span><div class='quote '>У тебя приличную часть времени занимает доступ к ячейке таблицы, если запомнить этот адрес в переменной, то будет немного быстрее:</div></div><br>
<br>
Пробовал. Выигрыш незначительный.<br>
<br>
С формулами все равно не получается.<br>
При всех вариантах вылетает: OLE error 800A03EC<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;ASheetRef.Cells[19,3]:=&#39;=SUM(C6;C11;C14:C18)&#39;;</div><div class="code_line">&nbsp;&nbsp; &nbsp;ASheetRef.Range[&#39;C19:C19&#39;].Formula:=&#39;СУММ(C6;C11;C14:C18)&#39;;</div><div class="code_line">&nbsp;&nbsp; &nbsp;ASheetRef.Range[&#39;C19&#39;, &#39;C20&#39;].Formula :=&#39;=SUM(C6;C11;C14:C18)&#39;;</div><div class="code_line">&nbsp;&nbsp; &nbsp;ASheetRef.Cells.Item[19,3].Value:=&#39;=SUM(C6;C11;C14:C18)&#39;;</div><div class="code_line">&nbsp;&nbsp; &nbsp;ASheetRef.Cells[19, 3].Formula:=&#39;=SUM(C6;C11;C14:C18)&#39;;</div><div class="code_line">&nbsp;&nbsp; &nbsp;ASheetRef.Cells[19, 3].FormulaR1C1:=&#39;=SUM(C6;C11;C14:C18)&#39;;</div></ol></div></div></div></div><br>
<br>
Может я чего-то недопонимаю?]]></description>
        <author>rapido</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=468012</guid>
        <pubDate>Mon, 27 Sep 2004 05:48:42 +0000</pubDate>
        <title>Вставка формулы в Excel</title>
        <link>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=468012</link>
        <description><![CDATA[Bas: Замни на FormulaR1C1 как это делает сам Excel<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">ActiveCell.FormulaR1C1 = &quot;=VALUE(RC[-4])&quot; </div></ol></div></div></div></div>]]></description>
        <author>Bas</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=467956</guid>
        <pubDate>Mon, 27 Sep 2004 04:05:14 +0000</pubDate>
        <title>Вставка формулы в Excel</title>
        <link>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=467956</link>
        <description><![CDATA[Jureth: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <span class='tag-quote__quote-info'>rapido &#064; 26.09.04, 00:40</span><div class='quote '>И еще. Я в цикле (вернее в двух) перебираю ячейки и обрисовываю граници:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;for i:=1 to PeriodCount + 2 do</div><div class="code_line">&nbsp;&nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;for j:=1 to INIT_ROW_COUNT do</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ASheetRef.Cells[j,i].Borders[EDGE_TOP].LineStyle:=LINE_STYLE;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ASheetRef.Cells[j,i].Borders[EDGE_TOP].Weight:=LINE_WIDTH;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ASheetRef.Cells[j,i].Borders[EDGE_LEFT].LineStyle:=LINE_STYLE;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ASheetRef.Cells[j,i].Borders[EDGE_LEFT].Weight:=LINE_WIDTH;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ASheetRef.Cells[j,i].Borders[EDGE_BOTTOM].LineStyle:=LINE_STYLE;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ASheetRef.Cells[j,i].Borders[EDGE_BOTTOM].Weight:=LINE_WIDTH;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ASheetRef.Cells[j,i].Borders[EDGE_RIGHT].LineStyle:=LINE_STYLE;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ASheetRef.Cells[j,i].Borders[EDGE_RIGHT].Weight:=LINE_WIDTH;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp;end;</div></ol></div></div></div></div><br>
</div></div> <br>
У тебя приличную часть времени занимает доступ к ячейке таблицы, если запомнить этот адрес в переменной, то будет немного быстрее:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">var a : OleVariant;//или какой он там?</div><div class="code_line">..</div><div class="code_line">&nbsp;&nbsp; &nbsp;for i:=1 to PeriodCount + 2 do</div><div class="code_line">&nbsp;&nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;for j:=1 to INIT_ROW_COUNT do</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a := ASheetRef.Cells[j,i];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a.Borders[EDGE_TOP].LineStyle:=LINE_STYLE;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a.Borders[EDGE_TOP].Weight:=LINE_WIDTH;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a.Borders[EDGE_LEFT].LineStyle:=LINE_STYLE;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a.Borders[EDGE_LEFT].Weight:=LINE_WIDTH;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a.Borders[EDGE_BOTTOM].LineStyle:=LINE_STYLE;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a.Borders[EDGE_BOTTOM].Weight:=LINE_WIDTH;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a.Borders[EDGE_RIGHT].LineStyle:=LINE_STYLE;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a.Borders[EDGE_RIGHT].Weight:=LINE_WIDTH;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp;end;</div></ol></div></div></div></div>]]></description>
        <author>Jureth</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=467422</guid>
        <pubDate>Sat, 25 Sep 2004 22:51:54 +0000</pubDate>
        <title>Вставка формулы в Excel</title>
        <link>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=467422</link>
        <description><![CDATA[anika: По поводу второго могу порекомендовать убрать обновление экрана перед выполнением кода (_WordDoc как TWordDocument):<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">_WordDoc.Application.ScreenUpdating:=false;</div></ol></div></div></div></div><br>
а самом конце обратно соответственно в true <br>
<br>
<span class="tag-color tag-color-named" data-value="gray" style="color: gray"><span class='tag-size' data-value='7' style='font-size:7pt;'>Добавлено <time class="tag-mergetime" datetime="2004-09-25T23:07:13+00:00">25.09.04, 23:07</time></span></span><br>
а формулу я присваивала как:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">Sheet.Cells.Item[i,j].Value:=&#39;=SUM(C6;C11;C14:C18)&#39;</div></ol></div></div></div></div>]]></description>
        <author>anika</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=467318</guid>
        <pubDate>Sat, 25 Sep 2004 17:40:53 +0000</pubDate>
        <title>Вставка формулы в Excel</title>
        <link>https://forum.sources.ru/index.php?showtopic=67199&amp;view=findpost&amp;p=467318</link>
        <description><![CDATA[rapido: Подскажите как вставить формулу в ячейку Excel.<br>
Пробовал так:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">ASheetRef.Range[&#39;C19:C19&#39;]:=&#39;=СУММ(C6;C11;C14:C18)&#39;;</div></ol></div></div></div></div><br>
<br>
и вот так:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">ASheetRef.Range[&#39;C19:C19&#39;].Formula:=&#39;=СУММ(C6;C11;C14:C18)&#39;;</div></ol></div></div></div></div><br>
<br>
И еще по всякому. Искал в интернете - ничего толкового не могу найти.<br>
<br>
Вылетает ошибка.<br>
<br>
И еще. Я в цикле (вернее в двух) перебираю ячейки и обрисовываю граници:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;for i:=1 to PeriodCount + 2 do</div><div class="code_line">&nbsp;&nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;for j:=1 to INIT_ROW_COUNT do</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ASheetRef.Cells[j,i].Borders[EDGE_TOP].LineStyle:=LINE_STYLE;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ASheetRef.Cells[j,i].Borders[EDGE_TOP].Weight:=LINE_WIDTH;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ASheetRef.Cells[j,i].Borders[EDGE_LEFT].LineStyle:=LINE_STYLE;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ASheetRef.Cells[j,i].Borders[EDGE_LEFT].Weight:=LINE_WIDTH;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ASheetRef.Cells[j,i].Borders[EDGE_BOTTOM].LineStyle:=LINE_STYLE;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ASheetRef.Cells[j,i].Borders[EDGE_BOTTOM].Weight:=LINE_WIDTH;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ASheetRef.Cells[j,i].Borders[EDGE_RIGHT].LineStyle:=LINE_STYLE;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ASheetRef.Cells[j,i].Borders[EDGE_RIGHT].Weight:=LINE_WIDTH;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp;end;</div></ol></div></div></div></div><br>
<br>
но все это происходит так меееееедленно. Нет ли способа ускорить процес?]]></description>
        <author>rapido</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      </channel>
      </rss>
	