Asp.netÀûÓÃExcelLibraryÊä³öEXCEL
public void DataTable2Excel(string attachName, DataTable tab)
{
string file = HttpContext.Current.Server.MapPath("/uploads/export/" + Guid.NewGuid().ToString() + ".xls");
Workbook workbook = new Workbook();
Worksheet worksheet = new Worksheet("Sheet1");
//¹¹½¨±íÍ·
for (int col = 0; col < tab.Columns.Count; col++)
{
worksheet.Cells[0, col] = new Cell(tab.Columns[col].ColumnName);
}
for (int rowIndex = 0; rowIndex < tab.Rows.Count; rowIndex++)
{
for (int colIndex = 0; colIndex < tab.Columns.Count; colIndex++)
{
worksheet.Cells[rowIndex + 1, colIndex] = new Cell(tab.Rows[rowIndex][colIndex].ToString());
}
}
//ÉèÖÃĬÈÏ¿í¶È
if (worksheet.
Ïà¹ØÎĵµ£º
ÔÚÇ°ÃæµÄ¼¸ÆªÎÄÕÂÖнéÉÜÁËasp.netµÄ´°ÌåÉí·ÝÑéÖ¤£¬ÕâÖÖÉí·ÝÑéÖ¤·½Ê½¿ÉÒÔÈÃͨ¹ýÑéÖ¤µÄÓû§·ÃÎÊÖ¸¶¨µÄĿ¼£¬¶øûÓÐͨ¹ýÑéÖ¤µÄÓû§²»ÄÜ·ÃÎʸÃĿ¼ÏµÄÍøÒ³¡£
µ«ÊÇ£¬ÓÐÒ»ÖÖÀýÍ⣬¾ÍÊÇĿ¼ÖеÄhtmlÎļþÀýÍâ¡£ÀýÈ磬ÔÚ¡¶asp.netÖеĴ°ÌåÉí·ÝÑéÖ¤£¨×î¼òµ¥Æª£©¡·ÖнéÉܵģ¬³ýÁ˵ǼÍøÒ³Ö®Íâ ......
eval()·½·¨ÔÚÔËÐÐʱʹÓ÷´ÉäÖ´ÐкóÆڰ󶨼ÆË㣬Òò´ËÓë±ê×¼µÄASP.NETÊý¾Ý°ó¶¨·½·¨bindÏà±È£¬»áµ¼ÖÂÐÔÄÜÃ÷ÏÔϽµ¡£ËüÒ»°ãÓÃÔÚ°ó¶¨Ê±ÐèÒª¸ñʽ»¯×Ö·û´®µÄÇé¿öÏ¡£¶àÊýÇé¿ö¾¡Á¿ÉÙÓô˷½·¨
Eval ·½·¨ÊǾ²Ì¬£¨Ö»¶Á£©·½·¨£¬¸Ã·½·¨²ÉÓÃÊý¾Ý×ֶεÄÖµ×÷Ϊ²ÎÊý²¢½«Æä×÷Ϊ×Ö·û´®·µ»Ø¡£Bind ·½·¨Ö§³Ö¶Á/д¹¦ÄÜ£¬¿ÉÒÔ¼ìË÷Êý¾Ý°ó¶¨¿Ø¼þµÄÖ ......
ÐèÒªÓõ½µÚÈý·½¿Ø¼þICSharpCode.SharpZipLib.dll
using System.IO;
using System.IO.Compression;
using ICSharpCode.SharpZipLib.Zip;
using ICSharpCode.SharpZipLib.GZip;
using ICSharpCode.SharpZipLib.Checksums;
#region ѹËõÎļþ¼Ð,Ö§³ÖµÝ¹é
/// <summary>
&nb ......
Ò»¡¢¸ÅÊö
Marquee£ºHtmlÖйöÆÁ¿Ø¼þ£¬¿ÉÒÔʹ°üº¬Ôڴ˱ê¼ÇÖеÄÄÚÈݽøÐи÷¸ö·½Ïò£¬¸÷ÖÖËٶȵĹö¶¯£¬Òò´ËÔÚ²»¿¼ÂÇʹÓõÚÈý·½¿Ø¼þµÄÇ°ÌáÏ£¬¿¼ÂÇʹÓÃMarquee+xmlhttpÀ´ÊµÏÖ¶¨´Î¸üÐÂÒ³ÃæÖеĹö¶¯ÄÚÈÝ£¬´ËʵÏÖÔÚIE6.0¼°ÒÔÉÏ°æ±¾²âÊÔͨ¹ý£¬ÆäËûä¯ÀÀÆ÷ÔÝʱδ²âÊÔ¹ý¡£
MarqueeÖеÄonfinishʼþ£ºÔÚ¸øMarqueeÊôÐÔloop¸ ......