Tuesday, July 27, 2010
The Electricity Station: Repairworks
The Electricity Station: Repairworks
SNAPS FROM RUSSIA
SNAPS FROM RUSSIA
St Basils, Red Square
Twelfth-century Vladimir cathedral, Russia
Stalin and Lenin
Yesterday's heroes in the Sculpture Park
Red Square, opposite the GUM shopping arcade
Orthodox ceremony at the Kremlin's Cathedral Square
One of Stalin's 'Seven Sisters', an apartment complex for life members of the Communist Party.
Novodevichy, 18th C. convent of the 'New Maidens' in Moscow
Matrioshka nesting dolls
Kievskaya Metro
Great Patriotic War Museum at Victory Monument
Folk singer
Detail of the Grand Kremlin Palace
Costumed guards at the State Museum, Red Square
Cocaine Submarine
Cocaine Submarine
Submarines are often used by drug traffickers to smuggle cocaine to Central and North America. They are mostly reported to be used by Colombian drug cartel members who export drugs from Colombia to Mexico. Such narco subs are usually small, capable to hold 5-6 people and about 10 tons of cargo. The first time U.S. Coast Guard uncovered such a submarine was in 2006.Export a DataTable to an Excel spreadsheet
If you need to export a DataTable to an Excel spreadsheet
Thankfully there is a another way to write a datatable to excel sheet is as follows--
We kanow that Excel can open HTML Tables so use this trick for this purpose.
Foirst take a webcontrol Datagrid and bind that to the DataTable which you want to write to Excel Sheet,So your datatable is now converted to HTML Tables Now create a streamwriter object and pass it to a HTMLWriter object which writes your Html Data To that Stream Writer and than StreamWriter write that HTMl datat to excel sheet.And now youe excel is ready to USE
// create the DataGrid and perform the databinding
System.Web.UI.WebControls.DataGrid grid =
new System.Web.UI.WebControls.DataGrid();
grid.HeaderStyle.Font.Bold = true;
grid.DataSource = data;
grid.DataMember = data.Stats.TableName;
grid.DataBind();
// render the DataGrid control to a file
using(StreamWriter sw = new StreamWriter("c:\\test.xls"))
{
using(HtmlTextWriter hw = new HtmlTextWriter(sw))
{
grid.RenderControl(hw);
}
}
Hope this will work for you :).
Subscribe to:
Posts (Atom)
loading..
Popular Posts
-
The server request timed out "Sys.WebForms.PageRequestManagerTimeoutException: The server request timed out" Getting ...
-
Sunaina tamil Actress rds. Sunaina is an Indian film actress, who works in Tamil, Telugu, Kannada and Malayalam film industries. Her de...

.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)
.jpg)