<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.bishopphillips.com/riskwiki/index.php?action=history&amp;feed=atom&amp;title=BpcSMScriptLibrary_9</id>
	<title>BpcSMScriptLibrary 9 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.bishopphillips.com/riskwiki/index.php?action=history&amp;feed=atom&amp;title=BpcSMScriptLibrary_9"/>
	<link rel="alternate" type="text/html" href="https://www.bishopphillips.com/riskwiki/index.php?title=BpcSMScriptLibrary_9&amp;action=history"/>
	<updated>2026-11-15T00:44:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://www.bishopphillips.com/riskwiki/index.php?title=BpcSMScriptLibrary_9&amp;diff=181&amp;oldid=prev</id>
		<title>Bishopj: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://www.bishopphillips.com/riskwiki/index.php?title=BpcSMScriptLibrary_9&amp;diff=181&amp;oldid=prev"/>
		<updated>2026-04-12T06:37:07Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:37, 12 April 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Bishopj</name></author>
	</entry>
	<entry>
		<id>https://www.bishopphillips.com/riskwiki/index.php?title=BpcSMScriptLibrary_9&amp;diff=180&amp;oldid=prev</id>
		<title>Bishopj: Created page with &quot;==TStringGrid BPC Library==  Language: Delphi 7 - 2007   Library provides routines for manipulating standard Delphi TStringGrids   &lt;pre&gt; //////////////////////////////////////...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.bishopphillips.com/riskwiki/index.php?title=BpcSMScriptLibrary_9&amp;diff=180&amp;oldid=prev"/>
		<updated>2019-09-11T16:46:06Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==TStringGrid BPC Library==  Language: Delphi 7 - 2007   Library provides routines for manipulating standard Delphi TStringGrids   &amp;lt;pre&amp;gt; //////////////////////////////////////...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==TStringGrid BPC Library==&lt;br /&gt;
&lt;br /&gt;
Language: Delphi 7 - 2007&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Library provides routines for manipulating standard Delphi TStringGrids&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//////// TStringGrid BPC Library&lt;br /&gt;
//////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
interface&lt;br /&gt;
uses Classes, Types,  Windows, Grids, DB;&lt;br /&gt;
&lt;br /&gt;
//////////////////////////////////////////////////&lt;br /&gt;
// TStringGrid BPC Library&lt;br /&gt;
&lt;br /&gt;
// Copy the selected rows from the grid into the clipboard as an smXMLPacket&lt;br /&gt;
// Returns true if the clipboard is non-empty&lt;br /&gt;
function bpcsmXMLSGGrid1Copy( Sender: TStringGrid) : boolean;&lt;br /&gt;
// Copy the selected rows from the grid into the clipboard as a CSV packet&lt;br /&gt;
// Returns true if the clipboard is non-empty&lt;br /&gt;
function bpcCSVSGGrid1Copy( Sender: TStringGrid) : boolean;&lt;br /&gt;
function bpcTABSGGrid1Copy( Sender: TStringGrid) : boolean;&lt;br /&gt;
// Paste into the stringgrid as a CSV, TAB, XML string and return the string&lt;br /&gt;
function bpcXMLSGGrid1Paste( Sender: TStringGrid) : TStringGrid;&lt;br /&gt;
function bpcCSVSGGrid1Paste( Sender: TStringGrid) : TStringGrid;&lt;br /&gt;
function bpcTABSGGrid1Paste( Sender: TStringGrid) : TStringGrid;&lt;br /&gt;
// Write the stringgrid to a string as a CSV file and return the string&lt;br /&gt;
function bpcSGWriteTABString(myStringGrid1: TStringGrid ) : string;&lt;br /&gt;
// Write the stringgrid to a string as a CSV file and return the string&lt;br /&gt;
function bpcSGWriteCSVString(myStringGrid1: TStringGrid ) : string;&lt;br /&gt;
// Read in a CSV string - the first row MUST BE the headings.  Strings are marked by &amp;quot;&amp;quot; and &amp;#039;,&amp;#039; are separators.&lt;br /&gt;
// If bGrowFromLastRow is true, the file will be added to theend of the stringgrid without clearing, if bClearGrid is true all&lt;br /&gt;
// columns will be cleared.  FixedCols is the number of fixed columns from the left, while StartCol says which col to start&lt;br /&gt;
// inserting data, while FixedColsList is a comma separated list of headings for the fixed columns portion (assuming the&lt;br /&gt;
// startcol is after the fied cols. The CSVString is the CSV string to be imported.  Returns the&lt;br /&gt;
// stringgrid.&lt;br /&gt;
function bpcSGLoadCSVString( myStringGrid1: TStringGrid; bGrowFromLastRow: boolean; bClearGrid: boolean; FixedCols, StartCol : integer; FixedColsList: string; CSVString: string): TStringGrid; overload;&lt;br /&gt;
function bpcSGLoadTABString( myStringGrid1: TStringGrid; bGrowFromLastRow: boolean; bClearGrid: boolean; FixedCols, StartCol : integer; FixedColsList: string; CSVString: string): TStringGrid; overload;&lt;br /&gt;
function bpcSGLoadDLMString( myStringGrid1: TStringGrid; bGrowFromLastRow: boolean; bClearGrid: boolean; FixedCols, StartCol : integer; FixedColsList: string; CSVString: string; Delim : char ): TStringGrid; overload;&lt;br /&gt;
// Read in a CSV file - the first row MUST BE the headings.  Strings are marked by &amp;quot;&amp;quot; and &amp;#039;,&amp;#039; are separators.&lt;br /&gt;
// If bGrowFromLastRow is true, the file will be added to theend of the stringgrid without clearing, if bClearGrid is true all&lt;br /&gt;
// columns will be cleared.  FixedCols is the number of fixed columns from the left, while StartCol says which col to start&lt;br /&gt;
// inserting data, while FixedColsList is a comma separated list of headings for the fixed columns portion (assuming the&lt;br /&gt;
// startcol is after the fied cols. The FileName is the full path including filename to the csv file to be imported.  Returns the&lt;br /&gt;
// stringgrid.&lt;br /&gt;
// eg: bpcSGLoadCSVFile( StringGrid1,(MergeRowsDSCBX.Checked), (not (MergeRowsDSCBX.Checked or MergeColsDSCBX.Checked)), 1, iff(MergeColsDSCBX.Checked,StringGrid1.ColCount,1), &amp;#039;Status&amp;#039;, FileName );&lt;br /&gt;
function bpcSGLoadCSVFile( myStringGrid1: TStringGrid; bGrowFromLastRow: boolean; bClearGrid: boolean; FixedCols, StartCol : integer; FixedColsList: string; FileName: string; QuotesAreDoubled : boolean=false ): TStringGrid;&lt;br /&gt;
// Read in a dtatset - the fieild names are used as the headings of the grid.&lt;br /&gt;
// If bGrowFromLastRow is true, the file will be added to theend of the stringgrid without clearing, if bClearGrid is true all&lt;br /&gt;
// columns will be cleared.  FixedCols is the number of fixed columns from the left, while StartCol says which col to start&lt;br /&gt;
// inserting data, while FixedColsList is a comma separated list of headings for the fixed columns portion (assuming the&lt;br /&gt;
// startcol is after the fied cols. The FileContents is the tdataset to be imported, which will be opened if necessary,&lt;br /&gt;
// and repositioned at the first record after completion. Returns the stringgrid.&lt;br /&gt;
// eg: bpcSGLoadFromTable( StringGrid1, (MergeRowsDSCBX.Checked), (not (MergeRowsDSCBX.Checked or MergeColsDSCBX.Checked)), 1, iff(MergeColsDSCBX.Checked,StringGrid1.ColCount,1), &amp;#039;Status&amp;#039;, FileContents );&lt;br /&gt;
function bpcSGLoadFromTable( myStringGrid1: TStringGrid; bGrowFromLastRow: boolean; bClearGrid: boolean; FixedCols, StartCol : integer; FixedColsList: string; FileContents: TDataSet): TStringGrid;&lt;br /&gt;
// Fill a stringgrid column targcol with an (optionally incrementing) Mask of chars, or with GUID&amp;#039;s, FromRow ToRowand and return the stringgrid&lt;br /&gt;
// OVERLOADED FUNCTION&lt;br /&gt;
//      bpcSGFillRows( StringGrid1, FromRow,  ToRow, MakeGUIDs, Mask, MaskChar, StartString, IncrementBy, OnlyNums )&lt;br /&gt;
// eg: bpcSGFillRows( StringGrid1, StringGrid1.Col, FromRow,  ToRow, FillColumnDlg.UseGUIDCBX.Checked, FillColumnDlg.FillMask.Text, iff( FillColumnDlg.UseMaskCharCBX.Checked, iff( length(FillColumnDlg.MaskChar.Text)&amp;gt;0, FillColumnDlg.MaskChar.Text[1], &amp;#039;#&amp;#039;), #0 ), trim(FillColumnDlg.StartString.Text) ,iff( FillColumnDlg.IncrementCBX.Checked, FillColumnDlg.Incrementer.AsInteger, 0 ), FillColumnDlg.NumsOnlyCBX.Checked );&lt;br /&gt;
function bpcSGFillRows( myStringGrid1: TStringGrid; targcol : integer; FromRow,  ToRow : integer; MakeGUIDs : boolean; Mask : string; MaskChar : char; StartString : string; IncrementBy : integer; OnlyNums  : boolean ) : TStringGrid; overload;&lt;br /&gt;
// Fill a stringgrid column targcol with GUID&amp;#039;s FromRow ToRowand and return the stringgrid&lt;br /&gt;
// OVERLOADED FUNCTION&lt;br /&gt;
function bpcSGFillRows( myStringGrid1: TStringGrid; targcol : integer; FromRow,  ToRow : integer; MakeGUIDs : boolean ) : TStringGrid; overload;&lt;br /&gt;
// Write the stringgrid to a file called sFileName as a CSV file&lt;br /&gt;
procedure bpcSGWriteCSVFile(myStringGrid1: TStringGrid; sFileName : string);&lt;br /&gt;
// Insert a new blank col at curcol in a stringgrid col returning the stringgrid&lt;br /&gt;
function bpcSGDeleteCol( myStringGrid1: TStringGrid; TargCol : integer ) : TStringGrid;&lt;br /&gt;
// Delete the row at targrow in a stringgrid returning the stringgrid&lt;br /&gt;
function bpcSGDeleteRow( myStringGrid1: TStringGrid; TargRow : integer ) : TStringGrid;&lt;br /&gt;
// Delete the rows in a stringgrid preserving the header row if includeHeader is false and returning the stringgrid&lt;br /&gt;
function bpcSGDeleteAllRows( myStringGrid1: TStringGrid; includeHeader : boolean ) : TStringGrid;&lt;br /&gt;
// Insert a new blank col at curcol in a stringgrid col returning the stringgrid&lt;br /&gt;
function bpcSGInsertCol( myStringGrid1: TStringGrid; CurCol : integer ) : TStringGrid;&lt;br /&gt;
// Insert a new blank row at currow in a stringgrid row returning the stringgrid&lt;br /&gt;
function bpcSGInsertRow( myStringGrid1: TStringGrid; CurRow : integer ) : TStringGrid;&lt;br /&gt;
// Clear the contents of a stringgrid col at targcol&lt;br /&gt;
function bpcSGClearCol( myStringGrid1: TStringGrid; targcol : integer ) : TStringGrid;&lt;br /&gt;
// Clear the contents of a stringgrid row at targrow&lt;br /&gt;
function bpcSGClearRow( myStringGrid1: TStringGrid; targrow : integer ) : TStringGrid;&lt;br /&gt;
// Clear all the contents of a stringgrid preserving the header row if includeHeader is false and returning the stringgrid&lt;br /&gt;
function bpcSGClearAllRows( myStringGrid1: TStringGrid; includeHeader : boolean ) : TStringGrid;&lt;br /&gt;
// Returns the column index of the stringgrid col corresponding to the colname&lt;br /&gt;
function bpcSGIndexOfSGCol( myStringGrid1: TStringGrid; colname : string ) : integer;&lt;br /&gt;
// Returns true if the stringgrid row is empty&lt;br /&gt;
function bpcSGIsEmptyRow( myStringGrid1: TStringGrid; targrow : integer ) : boolean;&lt;br /&gt;
// Copies a StringGrid col fromcol tocol and returns the index of the col after the tocol&lt;br /&gt;
function bpcSGCopyCol( myStringGrid1: TStringGrid; tocol, fromcol : integer ) : integer;&lt;br /&gt;
// Copies a StringGrid row fromrow torow and returns the index of the row after the torow&lt;br /&gt;
function bpcSGCopyRow( myStringGrid1: TStringGrid; torow, fromrow : integer ) : integer;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=BackLinks=&lt;br /&gt;
&lt;br /&gt;
{{#dpl: linksto={{FULLPAGENAME}} }}&lt;/div&gt;</summary>
		<author><name>Bishopj</name></author>
	</entry>
</feed>