a class for export datatable to csv/excel using xsl.


From codeproject . very good.
ContractedBlock.gif ExpandedBlockStart.gif
  1None.gif// ---------------------------------------------------------
  2None.gif// Rama Krishna's Export class
  3None.gif// Copyright (C) 2004 Rama Krishna. All rights reserved.
  4None.gif// ---------------------------------------------------------
  5None.gif
  6None.gif# region Includesdot.gif
  7None.gif
  8None.gifusing System;
  9None.gifusing System.Data;
 10None.gifusing System.Web;
 11None.gifusing System.Web.SessionState;
 12None.gifusing System.IO;
 13None.gifusing System.Text;
 14None.gifusing System.Xml;
 15None.gifusing System.Xml.Xsl;
 16None.gifusing System.Threading;
 17None.gif
 18None.gif# endregion // Includesdot.gif
 19None.gif
 20None.gifnamespace RKLib.ExportData
 21ExpandedBlockStart.gifContractedBlock.gifdot.gif{
 22InBlock.gif    # region Summary
 23InBlock.gif
 24ExpandedSubBlockStart.gifContractedSubBlock.gif    /**//// <summary>
 25InBlock.gif    /// Exports datatable to CSV or Excel format.
 26InBlock.gif    /// This uses DataSet's XML features and XSLT for exporting.
 27InBlock.gif    /// 
 28InBlock.gif    /// C#.Net Example to be used in WebForms
 29InBlock.gif    /// ------------------------------------- 
 30InBlock.gif    /// using MyLib.ExportData;
 31InBlock.gif    /// 
 32InBlock.gif    /// private void btnExport_Click(object sender, System.EventArgs e)
 33InBlock.gif    /// {
 34InBlock.gif    ///   try
 35InBlock.gif    ///   {
 36InBlock.gif    ///     // Declarations
 37InBlock.gif    ///     DataSet dsUsers =  ((DataSet) Session["dsUsers"]).Copy( );
 38InBlock.gif    ///     MyLib.ExportData.Export oExport = new MyLib.ExportData.Export("Web"); 
 39InBlock.gif    ///     string FileName = "UserList.csv";
 40InBlock.gif    ///     int[] ColList = {2, 3, 4, 5, 6};
 41InBlock.gif    ///     oExport.ExportDetails(dsUsers.Tables[0], ColList, Export.ExportFormat.CSV, FileName);
 42InBlock.gif    ///   }
 43InBlock.gif    ///   catch(Exception Ex)
 44InBlock.gif    ///   {
 45InBlock.gif    ///     lblError.Text = Ex.Message;
 46InBlock.gif    ///   }
 47InBlock.gif    /// }    
 48InBlock.gif    ///  
 49InBlock.gif    /// VB.Net Example to be used in WindowsForms
 50InBlock.gif    /// ----------------------------------------- 
 51InBlock.gif    /// Imports MyLib.ExportData
 52InBlock.gif    /// 
 53InBlock.gif    /// Private Sub btnExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
 54InBlock.gif    /// 
 55InBlock.gif    ///      Try    
 56InBlock.gif    ///      
 57InBlock.gif    ///     'Declarations
 58InBlock.gif    ///     Dim dsUsers As DataSet = (CType(Session("dsUsers"), DataSet)).Copy()
 59InBlock.gif    ///     Dim oExport As New MyLib.ExportData.Export("Win")
 60InBlock.gif    ///     Dim FileName As String = "C:\\UserList.xls"
 61InBlock.gif    ///     Dim ColList() As Integer = New Integer() {2, 3, 4, 5, 6}            
 62InBlock.gif    ///     oExport.ExportDetails(dsUsers.Tables(0), ColList, Export.ExportFormat.CSV, FileName)     
 63InBlock.gif    ///     
 64InBlock.gif    ///   Catch Ex As Exception
 65InBlock.gif    ///     lblError.Text = Ex.Message
 66InBlock.gif    ///   End Try
 67InBlock.gif    ///   
 68InBlock.gif    /// End Sub
 69InBlock.gif    ///     
 70ExpandedSubBlockEnd.gif    /// </summary>

 71InBlock.gif
 72InBlock.gif    # endregion // Summary
 73InBlock.gif
 74InBlock.gif    public class Export
 75ExpandedSubBlockStart.gifContractedSubBlock.gif    dot.gif{        
 76ExpandedSubBlockStart.gifContractedSubBlock.gif        public enum ExportFormat : int dot.gif{CSV = 1, Excel = 2}// Export format enumeration            
 77InBlock.gif        System.Web.HttpResponse response;
 78InBlock.gif        private string appType;    
 79InBlock.gif            
 80InBlock.gif        public Export()
 81ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 82InBlock.gif            appType = "Web";
 83InBlock.gif            response = System.Web.HttpContext.Current.Response;
 84ExpandedSubBlockEnd.gif        }

 85InBlock.gif
 86InBlock.gif        public Export(string ApplicationType)
 87ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
 88InBlock.gif            appType = ApplicationType;
 89InBlock.gif            if(appType != "Web" && appType != "Win"throw new Exception("Provide valid application format (Web/Win)");
 90InBlock.gif            if (appType == "Web") response = System.Web.HttpContext.Current.Response;
 91ExpandedSubBlockEnd.gif        }

 92InBlock.gif        
 93ContractedSubBlock.gifExpandedSubBlockStart.gif        ExportDetails OverLoad : Type#1#region ExportDetails OverLoad : Type#1
 94InBlock.gif        
 95InBlock.gif        // Function  : ExportDetails 
 96InBlock.gif        // Arguments : DetailsTable, FormatType, FileName
 97InBlock.gif        // Purpose     : To get all the column headers in the datatable and 
 98InBlock.gif        //               exorts in CSV / Excel format with all columns
 99InBlock.gif
100InBlock.gif        public void ExportDetails(DataTable DetailsTable, ExportFormat FormatType, string FileName)
101ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
102InBlock.gif            try
103ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{                
104InBlock.gif                if(DetailsTable.Rows.Count == 0
105InBlock.gif                    throw new Exception("There are no details to export.");                
106InBlock.gif                
107InBlock.gif                // Create Dataset
108InBlock.gif                DataSet dsExport = new DataSet("Export");
109InBlock.gif                DataTable dtExport = DetailsTable.Copy();
110InBlock.gif                dtExport.TableName = "Values"
111InBlock.gif                dsExport.Tables.Add(dtExport);    
112InBlock.gif                
113InBlock.gif                // Getting Field Names
114InBlock.gif                string[] sHeaders = new string[dtExport.Columns.Count];
115InBlock.gif                string[] sFileds = new string[dtExport.Columns.Count];
116InBlock.gif                
117InBlock.gif                for (int i=0; i < dtExport.Columns.Count; i++)
118ExpandedSubBlockStart.gifContractedSubBlock.gif                dot.gif{
119InBlock.gif                    sHeaders[i] = dtExport.Columns[i].ColumnName;
120InBlock.gif                    sFileds[i] = dtExport.Columns[i].ColumnName;                    
121ExpandedSubBlockEnd.gif                }

122InBlock.gif
123InBlock.gif                if(appType == "Web")
124InBlock.gif                    Export_with_XSLT_Web(dsExport, sHeaders, sFileds, FormatType, FileName);
125InBlock.gif                else if(appType == "Win")
126InBlock.gif                    Export_with_XSLT_Windows(dsExport, sHeaders, sFileds, FormatType, FileName);
127ExpandedSubBlockEnd.gif            }
            
128InBlock.gif            catch(Exception Ex)
129ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
130InBlock.gif                throw Ex;
131ExpandedSubBlockEnd.gif            }
            
132ExpandedSubBlockEnd.gif        }

133InBlock.gif
134ExpandedSubBlockEnd.gif        #endregion
 // ExportDetails OverLoad : Type#1
135InBlock.gif
136ContractedSubBlock.gifExpandedSubBlockStart.gif        ExportDetails OverLoad : Type#2#region ExportDetails OverLoad : Type#2
137InBlock.gif
138InBlock.gif        // Function  : ExportDetails 
139InBlock.gif        // Arguments : DetailsTable, ColumnList, FormatType, FileName        
140InBlock.gif        // Purpose     : To get the specified column headers in the datatable and
141InBlock.gif        //               exorts in CSV / Excel format with specified columns
142InBlock.gif
143InBlock.gif        public void ExportDetails(DataTable DetailsTable, int[] ColumnList, ExportFormat FormatType, string FileName)
144ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
145InBlock.gif            try
146ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
147InBlock.gif                if(DetailsTable.Rows.Count == 0)
148InBlock.gif                    throw new Exception("There are no details to export");
149InBlock.gif                
150InBlock.gif                // Create Dataset
151InBlock.gif                DataSet dsExport = new DataSet("Export");
152InBlock.gif                DataTable dtExport = DetailsTable.Copy();
153InBlock.gif                dtExport.TableName = "Values"
154InBlock.gif                dsExport.Tables.Add(dtExport);
155InBlock.gif
156InBlock.gif                if(ColumnList.Length > dtExport.Columns.Count)
157InBlock.gif                    throw new Exception("ExportColumn List should not exceed Total Columns");
158InBlock.gif                
159InBlock.gif                // Getting Field Names
160InBlock.gif                string[] sHeaders = new string[ColumnList.Length];
161InBlock.gif                string[] sFileds = new string[ColumnList.Length];
162InBlock.gif                
163InBlock.gif                for (int i=0; i < ColumnList.Length; i++)
164ExpandedSubBlockStart.gifContractedSubBlock.gif                dot.gif{
165InBlock.gif                    if((ColumnList[i] < 0|| (ColumnList[i] >= dtExport.Columns.Count))
166InBlock.gif                        throw new Exception("ExportColumn Number should not exceed Total Columns Range");
167InBlock.gif                    
168InBlock.gif                    sHeaders[i] = dtExport.Columns[ColumnList[i]].ColumnName;
169InBlock.gif                    sFileds[i] = dtExport.Columns[ColumnList[i]].ColumnName;                    
170ExpandedSubBlockEnd.gif                }

171InBlock.gif
172InBlock.gif                if(appType == "Web")
173InBlock.gif                    Export_with_XSLT_Web(dsExport, sHeaders, sFileds, FormatType, FileName);
174InBlock.gif                else if(appType == "Win")
175InBlock.gif                    Export_with_XSLT_Windows(dsExport, sHeaders, sFileds, FormatType, FileName);
176ExpandedSubBlockEnd.gif            }
            
177InBlock.gif            catch(Exception Ex)
178ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
179InBlock.gif                throw Ex;
180ExpandedSubBlockEnd.gif            }
            
181ExpandedSubBlockEnd.gif        }

182InBlock.gif        
183ExpandedSubBlockEnd.gif        #endregion
 // ExportDetails OverLoad : Type#2
184InBlock.gif
185ContractedSubBlock.gifExpandedSubBlockStart.gif        ExportDetails OverLoad : Type#3#region ExportDetails OverLoad : Type#3
186InBlock.gif
187InBlock.gif        // Function  : ExportDetails 
188InBlock.gif        // Arguments : DetailsTable, ColumnList, Headers, FormatType, FileName    
189InBlock.gif        // Purpose     : To get the specified column headers in the datatable and    
190InBlock.gif        //               exorts in CSV / Excel format with specified columns and 
191InBlock.gif        //               with specified headers
192InBlock.gif
193InBlock.gif        public void ExportDetails(DataTable DetailsTable, int[] ColumnList, string[] Headers, ExportFormat FormatType, 
194InBlock.gif            string FileName)
195ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
196InBlock.gif            try
197ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
198InBlock.gif                if(DetailsTable.Rows.Count == 0)
199InBlock.gif                    throw new Exception("There are no details to export");
200InBlock.gif                
201InBlock.gif                // Create Dataset
202InBlock.gif                DataSet dsExport = new DataSet("Export");
203InBlock.gif                DataTable dtExport = DetailsTable.Copy();
204InBlock.gif                dtExport.TableName = "Values"
205InBlock.gif                dsExport.Tables.Add(dtExport);
206InBlock.gif
207InBlock.gif                if(ColumnList.Length != Headers.Length)
208InBlock.gif                    throw new Exception("ExportColumn List and Headers List should be of same length");
209InBlock.gif                else if(ColumnList.Length > dtExport.Columns.Count || Headers.Length > dtExport.Columns.Count)
210InBlock.gif                    throw new Exception("ExportColumn List should not exceed Total Columns");
211InBlock.gif                
212InBlock.gif                // Getting Field Names
213InBlock.gif                string[] sFileds = new string[ColumnList.Length];
214InBlock.gif                
215InBlock.gif                for (int i=0; i < ColumnList.Length; i++)
216ExpandedSubBlockStart.gifContractedSubBlock.gif                dot.gif{
217InBlock.gif                    if((ColumnList[i] < 0|| (ColumnList[i] >= dtExport.Columns.Count))
218InBlock.gif                        throw new Exception("ExportColumn Number should not exceed Total Columns Range");
219InBlock.gif                    
220InBlock.gif                    sFileds[i] = dtExport.Columns[ColumnList[i]].ColumnName;                    
221ExpandedSubBlockEnd.gif                }

222InBlock.gif
223InBlock.gif                if(appType == "Web")
224InBlock.gif                    Export_with_XSLT_Web(dsExport, Headers, sFileds, FormatType, FileName);
225InBlock.gif                else if(appType == "Win")
226InBlock.gif                    Export_with_XSLT_Windows(dsExport, Headers, sFileds, FormatType, FileName);
227ExpandedSubBlockEnd.gif            }
            
228InBlock.gif            catch(Exception Ex)
229ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
230InBlock.gif                throw Ex;
231ExpandedSubBlockEnd.gif            }
            
232ExpandedSubBlockEnd.gif        }

233InBlock.gif        
234ExpandedSubBlockEnd.gif        #endregion
 // ExportDetails OverLoad : Type#3
235InBlock.gif
236ContractedSubBlock.gifExpandedSubBlockStart.gif        Export_with_XSLT_Web#region Export_with_XSLT_Web
237InBlock.gif
238InBlock.gif        // Function  : Export_with_XSLT_Web 
239InBlock.gif        // Arguments : dsExport, sHeaders, sFileds, FormatType, FileName
240InBlock.gif        // Purpose   : Exports dataset into CSV / Excel format
241InBlock.gif
242InBlock.gif        private void Export_with_XSLT_Web(DataSet dsExport, string[] sHeaders, string[] sFileds, ExportFormat FormatType, string FileName)
243ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
244InBlock.gif            try
245ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{                
246InBlock.gif                // Appending Headers
247InBlock.gif                response.Clear();
248InBlock.gif                response.Buffer= true;
249InBlock.gif                
250InBlock.gif                if(FormatType == ExportFormat.CSV)
251ExpandedSubBlockStart.gifContractedSubBlock.gif                dot.gif{
252InBlock.gif                    response.ContentType = "text/csv";
253InBlock.gif                    response.AppendHeader("content-disposition""attachment; filename=" + FileName);
254ExpandedSubBlockEnd.gif                }
        
255InBlock.gif                else
256ExpandedSubBlockStart.gifContractedSubBlock.gif                dot.gif{
257InBlock.gif                    response.ContentType = "application/vnd.ms-excel";
258InBlock.gif                    response.AppendHeader("content-disposition""attachment; filename=" + FileName);
259ExpandedSubBlockEnd.gif                }

260InBlock.gif
261InBlock.gif                // XSLT to use for transforming this dataset.                        
262InBlock.gif                MemoryStream stream = new MemoryStream( );
263InBlock.gif                XmlTextWriter writer = new XmlTextWriter(stream, Encoding.UTF8);
264InBlock.gif                
265InBlock.gif                CreateStylesheet(writer, sHeaders, sFileds, FormatType);
266InBlock.gif                writer.Flush( ); 
267InBlock.gif                stream.Seek( 0, SeekOrigin.Begin); 
268InBlock.gif
269InBlock.gif                XmlDataDocument xmlDoc = new XmlDataDocument(dsExport);
270InBlock.gif                XslTransform xslTran = new XslTransform();                
271InBlock.gif                xslTran.Load(new XmlTextReader(stream), nullnull);
272InBlock.gif                                
273InBlock.gif                System.IO.StringWriter  sw = new System.IO.StringWriter();            
274InBlock.gif                xslTran.Transform(xmlDoc, null, sw, null);
275InBlock.gif                                    
276InBlock.gif                //Writeout the Content                
277InBlock.gif                response.Write(sw.ToString());                
278InBlock.gif                sw.Close();    
279InBlock.gif                writer.Close();
280InBlock.gif                stream.Close();            
281InBlock.gif                response.End();
282ExpandedSubBlockEnd.gif            }

283InBlock.gif            catch(ThreadAbortException Ex)
284ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
285InBlock.gif                string ErrMsg = Ex.Message;
286ExpandedSubBlockEnd.gif            }

287InBlock.gif            catch(Exception Ex)
288ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
289InBlock.gif                throw Ex;
290ExpandedSubBlockEnd.gif            }

291ExpandedSubBlockEnd.gif        }
        
292InBlock.gif        
293ExpandedSubBlockEnd.gif        #endregion
 // Export_with_XSLT 
294InBlock.gif
295ContractedSubBlock.gifExpandedSubBlockStart.gif        Export_with_XSLT_Windows#region Export_with_XSLT_Windows 
296InBlock.gif
297InBlock.gif        // Function  : Export_with_XSLT_Windows 
298InBlock.gif        // Arguments : dsExport, sHeaders, sFileds, FormatType, FileName
299InBlock.gif        // Purpose   : Exports dataset into CSV / Excel format
300InBlock.gif
301InBlock.gif        private void Export_with_XSLT_Windows(DataSet dsExport, string[] sHeaders, string[] sFileds, ExportFormat FormatType, string FileName)
302ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
303InBlock.gif            try
304ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{                
305InBlock.gif                // XSLT to use for transforming this dataset.                        
306InBlock.gif                MemoryStream stream = new MemoryStream( );
307InBlock.gif                XmlTextWriter writer = new XmlTextWriter(stream ,  Encoding.GetEncoding("gb2312"));
308InBlock.gif                
309InBlock.gif                CreateStylesheet(writer, sHeaders, sFileds, FormatType);
310InBlock.gif                writer.Flush( ); 
311InBlock.gif                stream.Seek( 0, SeekOrigin.Begin); 
312InBlock.gif
313InBlock.gif                XmlDataDocument xmlDoc = new XmlDataDocument(dsExport);
314InBlock.gif                XslTransform xslTran = new XslTransform();                
315InBlock.gif                xslTran.Load(new XmlTextReader(stream), nullnull);
316InBlock.gif                 
317InBlock.gif                
318InBlock.gif                System.IO.StringWriter  sw = new System.IO.StringWriter();    
319InBlock.gif                 
320InBlock.gif                xslTran.Transform(xmlDoc, null, sw, null);
321InBlock.gif                
322InBlock.gif 
323InBlock.gif                //Writeout the Content        
324InBlock.gif                //Stream stream = new     Stream(
325InBlock.gif                 
326InBlock.gif                StreamWriter strwriter =  new StreamWriter( FileName , false ,Encoding.GetEncoding("gb2312")) ;// ,  Encoding.GetEncoding("gb2312") );
327InBlock.gif                 
328InBlock.gif                
329InBlock.gif                strwriter.WriteLine(sw.ToString().Replace( "no_of_replies","No Of Replies" ) );
330InBlock.gif                strwriter.Close();
331InBlock.gif                
332InBlock.gif                sw.Close();    
333InBlock.gif                writer.Close();
334InBlock.gif                stream.Close();    
335ExpandedSubBlockEnd.gif            }
            
336InBlock.gif            catch(Exception Ex)
337ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
338InBlock.gif                throw Ex;
339ExpandedSubBlockEnd.gif            }

340ExpandedSubBlockEnd.gif        }
        
341InBlock.gif        
342ExpandedSubBlockEnd.gif        #endregion
 // Export_with_XSLT 
343InBlock.gif
344ContractedSubBlock.gifExpandedSubBlockStart.gif        CreateStylesheet#region CreateStylesheet 
345InBlock.gif
346InBlock.gif        // Function  : WriteStylesheet 
347InBlock.gif        // Arguments : writer, sHeaders, sFileds, FormatType
348InBlock.gif        // Purpose   : Creates XSLT file to apply on dataset's XML file 
349InBlock.gif
350InBlock.gif        private void CreateStylesheet(XmlTextWriter writer, string[] sHeaders, string[] sFileds, ExportFormat FormatType)
351ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
352InBlock.gif            try
353ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
354InBlock.gif                // xsl:stylesheet
355InBlock.gif                string ns = "http://www.w3.org/1999/XSL/Transform";    
356InBlock.gif                writer.Formatting = Formatting.Indented;
357InBlock.gif                writer.WriteStartDocument( );                
358InBlock.gif                writer.WriteStartElement("xsl","stylesheet",ns);
359InBlock.gif                writer.WriteAttributeString("version","1.0");
360InBlock.gif                writer.WriteStartElement("xsl:output");
361InBlock.gif                writer.WriteAttributeString("method","text");
362InBlock.gif                writer.WriteAttributeString("version","4.0");
363InBlock.gif                writer.WriteEndElement( );
364InBlock.gif                
365InBlock.gif                // xsl-template
366InBlock.gif                writer.WriteStartElement("xsl:template");
367InBlock.gif                writer.WriteAttributeString("match","/");
368InBlock.gif
369InBlock.gif                // xsl:value-of for headers
370InBlock.gif                for(int i=0; i< sHeaders.Length; i++)
371ExpandedSubBlockStart.gifContractedSubBlock.gif                dot.gif{
372InBlock.gif                    writer.WriteString("\"");
373InBlock.gif                    writer.WriteStartElement("xsl:value-of");
374InBlock.gif                    writer.WriteAttributeString("select""'" + sHeaders[i] + "'");
375InBlock.gif                    writer.WriteEndElement( ); // xsl:value-of
376InBlock.gif                    writer.WriteString("\"");
377InBlock.gif                    if (i != sFileds.Length - 1) writer.WriteString( (FormatType == ExportFormat.CSV ) ? "," : "    " );
378ExpandedSubBlockEnd.gif                }

379InBlock.gif                                
380InBlock.gif                // xsl:for-each
381InBlock.gif                writer.WriteStartElement("xsl:for-each");
382InBlock.gif                writer.WriteAttributeString("select","Export/Values");
383InBlock.gif                writer.WriteString("\r\n");                
384InBlock.gif                
385InBlock.gif                // xsl:value-of for data fields
386InBlock.gif                for(int i=0; i< sFileds.Length; i++)
387ExpandedSubBlockStart.gifContractedSubBlock.gif                dot.gif{                    
388InBlock.gif                    writer.WriteString("\"");
389InBlock.gif                    writer.WriteStartElement("xsl:value-of");
390InBlock.gif                    writer.WriteAttributeString("select", sFileds[i]);
391InBlock.gif                    writer.WriteEndElement( ); // xsl:value-of
392InBlock.gif                    writer.WriteString("\"");
393InBlock.gif                    if (i != sFileds.Length - 1) writer.WriteString( (FormatType == ExportFormat.CSV ) ? "," : "    " );
394ExpandedSubBlockEnd.gif                }

395InBlock.gif                                
396InBlock.gif                writer.WriteEndElement( ); // xsl:for-each
397InBlock.gif                writer.WriteEndElement( ); // xsl-template
398InBlock.gif                writer.WriteEndElement( ); // xsl:stylesheet
399InBlock.gif                writer.WriteEndDocument( );                    
400ExpandedSubBlockEnd.gif            }

401InBlock.gif            catch(Exception Ex)
402ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
403InBlock.gif                throw Ex;
404ExpandedSubBlockEnd.gif            }

405ExpandedSubBlockEnd.gif        }

406InBlock.gif        
407ExpandedSubBlockEnd.gif        #endregion
 // WriteStylesheet
408InBlock.gif
409ExpandedSubBlockEnd.gif    }

410ExpandedBlockEnd.gif}

411None.gif

转载于:https://www.cnblogs.com/yangfada/archive/2006/09/27/516692.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值