Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > ASP > ASP Forum > code ของการดึงข้อมูลจากฐานข้อมูลมาลงใน Excel โดยใช้ asp



 

code ของการดึงข้อมูลจากฐานข้อมูลมาลงใน Excel โดยใช้ asp

 



Topic : 016573

Guest




ได้ลองเอา code ไปแล้วลองรันดูปรากฎว่ามันขึ้น Error ว่า
Microsoft Office Excel (0x800A03EC)
Microsoft Office Excel cannot access the file 'C:\inetpub\wwwroot'. There are several possible reasons: ? The file name or path does not exist. ? The file is being used by another program. ? The workbook you are trying to save has the same name as a currently open workbook.

แล้วบรรทัดที่ Error คือ
xlSheet.SaveAs Server.MapPath(strFileName)


ช่วยหาวิธีแก้ให้หน่อยนะคะ


Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 13 พ.ย. 2550 11:07:53 By : เล็ก View : 4042 Reply : 5
 

 

No. 1



โพสกระทู้ ( 2 )
บทความ ( 0 )



สถานะออฟไลน์


ช่วยผมด้วยคับ ผม import ข้อมูลที่เป็น excel เข้าไปใน access ไม่เป็นคับ บอกอย่างละเอียดทุกขั้นตอนเลยนะคับ
ขอบคุณคับ






Date : 2010-02-02 22:58:07 By : autoearth
 


 

No. 2

Guest


Code (PHP)
<?
header('Content-type: application/ms-word'); // ตรงนี้แหละ ประกาศหัวไปก่อนเลย
header('Content-Disposition: attachment; filename="E-service .doc"');   // และตรงนี้ด้วย
//  อันนี้ทดสอบดึงจาก DB ที่มีอยู่นะค่ะเอาไปดัดแปลงดู
$host="localhost";
$username="xx";
$password="xxx";
$db="xxx";
$tb="xx";
mysql_connect( $host,$username,$password) or die ("ติดต่อกับฐานข้อมูล Mysql ไม่ได้ ");
mysql_select_db($db) or die("เลือกฐานข้อมูลไม่ได้"); 
$SQL = 'SET CHARACTER SET tis620';
	mysql_query($SQL);
	$SQL ="SET collation_connection = 'tis620_thai_ci' ";
echo "<center><img src='http://reru.ac.th/logo/4.jpg' width='85' height='99'><br>";
echo "แบบฟอร์มขอใช้บริการซ่อมบำรุงเครื่องคอมพิวเตอร์และติดตั้ง-ตรวจสอบระบบงาน<br> "; 
echo"ศูนย์คอมพิวเตอร์และอินเทอร์เน็ต มหาวิทยาลัยราชภัฏร้อยเอ็ด<br><hr></center>";
$sql = "select * from $tb  where id='$cid'";
$dbquery = mysql_db_query($db, $sql);
?>

<meta http-equiv="Content-Type" content="text/html; charset=windows-874" /><table width="653" border="0" align="center" cellpadding="0" cellspacing="0">
<? while($result = mysql_fetch_array($dbquery)) { ?>
<tr>
<td colspan="2"><div align="right">วันที่&nbsp;  <?=$result[adddate ];?>
</div></td><br>
</tr>
<tr>
  <td width="423">ข้าพเจ้า (นาย/นาง/นางสาว)  
    <?=$result[addname ];?> </td>
  <td width="230">หน่วยงาน 
    <?=$result[work];?></td>
</tr>
<tr>
  <td colspan="2">อาการของเครื่องคอมพิวเตอร์/ปัญหาในการใช้งาน 
    <?=$result[note];?></td>
</tr>
<tr>
  <td colspan="2">&nbsp;</td>
</tr>
<tr>
  <td colspan="2">&nbsp;</td>
</tr>
<tr>
  <td colspan="2"></td>
</tr>
<tr>
  <td colspan="2">&nbsp;</td>
</tr>
<tr>
  <td colspan="2"><div align="right">...................................&nbsp;<br>(
      <?=$result[addname ];?> 
    ) </div></td>
</tr>
<tr>
  <td colspan="2">&nbsp;</td>
</tr>
<tr>
  <td colspan="2"><u>สำหรับเจ้าหน้าที่ปฏิบัติงาน</u></td>
</tr>
<tr>
  <td colspan="2">ผลการปฏิบัติงาน : 
    <?=$result[Answers];?></td>
</tr>
<tr>
  <td colspan="2"><div align="center">
    <?=$result[chack ];?>
  </div></td>
</tr>
<tr>
  <td colspan="2"><div align="right">.<br>
    (
      <?=$result[sum];?>
      <?=$result[adic];?>
      <?=$result[surin];?>
)</div></td>
</tr>
<? } ?> 
</table>

Date : 2010-02-26 14:13:37 By : นักเดินทาง
 

 

No. 3

Guest


แล้ว Error แบบนี้หล่ะ
Microsoft Office Excel (0x800A03EC)
Microsoft Office Excel cannot open or save any more documents because there is not enough available memory or disk space. • To make more memory available, close workbooks or programs you no longer need. • To free disk space, delete files you no longer need from the disk you are saving to.

ช่วยด้วยนะค่ะ
Date : 2010-04-21 16:32:26 By : kung
 


 

No. 4



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

Go to : Microsoft Office Excel cannot open or save any more documents because there is not enough available memory or disk space.
Date : 2010-12-14 18:23:31 By : webmaster
 


 

No. 5



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

Quote:
There are several possible reasons: • The file name or path does not exist. • The file is being used by another program. • The workbook you are trying to save has the same name as a currently open workbook.'


จัดไปตามนี้ครับ

ให้สร้างโฟเดอร์ตามนี้

・Windows 2008 Server x64
C:\Windows\SysWOW64\config\systemprofile\Desktop

・Windows 2008 Server x86
C:\Windows\System32\config\systemprofile\Desktop


อย่าลืมกำหนด Permission ให้โฟเดอร์ด้วย โดย User จะชื่อว่า IUSR หรือ IWAM เลือก Full Control

Go to : Unable to get the Open property of the Workbooks class (Excel 2003, 2007 Automation on Windows 2008 Server)
Date : 2012-11-28 14:26:56 By : mr.win
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : code ของการดึงข้อมูลจากฐานข้อมูลมาลงใน Excel โดยใช้ asp
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 03
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่