查看單個文章
舊 2006-11-02, 01:03 PM   #1
zimihop 帥哥
註冊會員
 
zimihop 的頭像
榮譽勳章
UID - 62918
在線等級: 級別:15 | 在線時長:305小時 | 升級還需:15小時級別:15 | 在線時長:305小時 | 升級還需:15小時級別:15 | 在線時長:305小時 | 升級還需:15小時級別:15 | 在線時長:305小時 | 升級還需:15小時級別:15 | 在線時長:305小時 | 升級還需:15小時
註冊日期: 2003-04-29
VIP期限: 2009-04
住址: 台灣小角落
文章: 130
精華: 0
現金: 676 金幣
資產: 5676 金幣
預設 請問如何讓excel判斷首行字元而自動刪除資料

各位大大
線再小弟遇到一個困擾,就是當資料由資料庫輸出成excel資料時,必須切割欄位而儲存成excel欄位資料。而我現在想由首列的第二個字元判斷,如果首列的第二個字原為"="(等號)的話,那這一列的資料就全部刪除。不知道各位大大有什麼解決方式。附上資料切割的script

<html xmlns="urn:schemas-microsoft-comfficeffice"
xmlns:x="urn:schemas-microsoft-comffice:excel"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=big5">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 11">
<link id=Main-File rel=Main-File href="../Book1.htm">
<link rel=File-List href=filelist.xml>
<link rel=Edit-Time-Data href=editdata.mso>
<link rel=Stylesheet href=stylesheet.css>
<style>
<!--table
{mso-displayed-decimal-separator:"\.";
mso-displayed-thousand-separator:"\,";}
@page
{margin:1.0in .75in 1.0in .75in;
mso-header-margin:.5in;
mso-footer-margin:.5in;}
ruby
{ruby-align:left;}
rt
{color:windowtext;
font-size:9.0pt;
font-weight:400;
font-style:normal;
text-decoration:none;
font-family:新細明體, serif;
mso-font-charset:136;
mso-char-type:none;
display:none;}
-->
</style>
<![if !supportTabStrip]><script language="JavaScript">
<!--
function fnUpdateTabs()
{
if (parent.window.g_iIEVer>=4) {
if (parent.document.readyState=="complete"
&& parent.frames['frTabs'].document.readyState=="complete")
parent.fnSetActiveSheet(0);
else
window.setTimeout("fnUpdateTabs();",150);
}
}

if (window.name!="frSheet")
window.location.replace("../Book1.htm");
else
fnUpdateTabs();
//-->
</script>
<![endif]><!--[if gte mso 9]><xml>
<x:WorksheetOptions>
<xefaultRowHeight>330</xefaultRowHeight>
<x:Selected/>
<x:ProtectContents>False</x:ProtectContents>
<x:ProtectObjects>False</x:ProtectObjects>
<x:ProtectScenarios>False</x:ProtectScenarios>
</x:WorksheetOptions>
</xml><![endif]-->
</head>

<body link=blue vlink=purple>

<table x:str border=0 cellpadding=0 cellspacing=0 width=72 style='border-collapse:
collapse;table-layout:fixed;width:54pt'>
<col width=72 style='width:54pt'>
<tr height=22 style='height:16.5pt'>
<td height=22 width=72 style='height:16.5pt;width:54pt'></td>
</tr>
<![if supportMisalignedColumns]>
<tr height=0 style='display:none'>
<td width=72 style='width:54pt'></td>
</tr>
<![endif]>
</table>

</body>

</html>
zimihop 目前離線  
送花文章: 60, 收花文章: 15 篇, 收花: 29 次
回覆時引用此帖