Click here to Skip to main content
11,437,816 members (39,307 online)
   

ASP.NET

 
QuestionBrowser Compatibilty Pin
ravitejapammi7-Jan-13 0:54
memberravitejapammi7-Jan-13 0:54 
AnswerRe: Browser Compatibilty Pin
Sandeep Mewara7-Jan-13 3:53
mvpSandeep Mewara7-Jan-13 3:53 
GeneralRe: Browser Compatibilty Pin
ravitejapammi17-Jan-13 21:21
memberravitejapammi17-Jan-13 21:21 
GeneralRe: Browser Compatibilty Pin
Sandeep Mewara18-Jan-13 0:50
mvpSandeep Mewara18-Jan-13 0:50 
GeneralJavaScript - window.print() not working in Android mobile browsers Pin
ravitejapammi24-Jan-13 0:08
memberravitejapammi24-Jan-13 0:08 
QuestionHow can I delete a Column of XLSX file with EPPlus in web application? [modified] Pin
cawboy_iran6-Jan-13 21:00
membercawboy_iran6-Jan-13 21:00 
AnswerRe: How can I delete a Column of XLSX file From EPPlus in web application? Pin
Sandeep Mewara6-Jan-13 22:26
mvpSandeep Mewara6-Jan-13 22:26 
GeneralRe: How can I delete a Column of XLSX file From EPPlus in web application? Pin
cawboy_iran7-Jan-13 3:48
membercawboy_iran7-Jan-13 3:48 
thanx for your reply...

I leave My Code Here

I would remove the additional Column in and also want to change the page layout direction to (right to left)

'----/// Click Report Button ///----
Protected Sub btnExcel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExcel.Click
        If "MYcondition is true" Then
            GenerateXLSXFile(CreateDataTable())
        End If
End Sub
 
'----/// Genrate Report ///----
Private Sub GenerateXLSXFile(ByVal tbl As DataTable)
        Dim excelPackage = New ExcelPackage
        Dim excelWorksheet = excelPackage.Workbook.Worksheets.Add("My_Worksheet")
 
        excelWorksheet.View.ShowGridLines = False
        excelWorksheet.Cells.Style.Border.Bottom.Style = Style.ExcelBorderStyle.Thick
		
        excelWorksheet.Cells("A5").LoadFromDataTable(tbl, True)
        
       '-----/// Hide a Column ///---------
	excelWorksheet.Column(2).Hidden = True    
	
 
       '----/// Change PageLayout Direction ///---------------	
        excelWorksheet.View.PageLayoutView = excelWorksheet.View.RightToLeft  
 
        excelWorksheet.Cells("A5").Value = "header_1"
        excelWorksheet.Cells("B5").Value = "header_2"
        excelWorksheet.Cells("C5").Value = "header_3"
 
        Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
        Response.AddHeader("content-disposition", "attachment;  filename=My_ExcelName.xlsx")
 
        Dim stream As MemoryStream = New MemoryStream(excelPackage.GetAsByteArray())
        Response.OutputStream.Write(stream.ToArray(), 0, stream.ToArray().Length)
        Response.Flush()
        Response.Close()
End Sub
 
'----/// Create Data Table for Exel Report (use store procedure) ///----
Private Function CreateDataTable() As DataTable
        Dim dataTable As New DataTable("tbl_Name")
        Dim dataAdapter As New SqlDataAdapter()
 
        Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("ProvidersCS").ToString)
        Dim cmd As New SqlCommand("My Select Command", conn)
 
        cmd.CommandType = CommandType.StoredProcedure
        Try
            conn.Open()
            dataAdapter.SelectCommand = cmd
            dataAdapter.Fill(dataTable)
        Catch ex As Exception
        Finally
            conn.Close()
        End Try
 
        Return dataTable		
End Function

QuestionWoW Slider now showing the image Pin
Jassim Rahma5-Jan-13 9:06
memberJassim Rahma5-Jan-13 9:06 
AnswerRe: WoW Slider now showing the image Pin
Sandeep Mewara5-Jan-13 21:09
mvpSandeep Mewara5-Jan-13 21:09 
QuestionUnable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.TextBox Pin
amsedky5-Jan-13 2:00
memberamsedky5-Jan-13 2:00 
AnswerRe: Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.TextBox Pin
Sandeep Mewara5-Jan-13 21:24
mvpSandeep Mewara5-Jan-13 21:24 
Questiondisplay animated image while save data to asp.net Pin
ashraf almashhari4-Jan-13 22:46
memberashraf almashhari4-Jan-13 22:46 
AnswerRe: display animated image while save data to asp.net Pin
Sandeep Mewara4-Jan-13 23:14
mvpSandeep Mewara4-Jan-13 23:14 
QuestionAsp.net Pin
Manjunath Hegde4-Jan-13 1:41
memberManjunath Hegde4-Jan-13 1:41 
AnswerRe: Asp.net Pin
Rahul Rajat Singh4-Jan-13 2:04
memberRahul Rajat Singh4-Jan-13 2:04 
QuestionInsert/Update/Delete Records in Dynamic Generated Textbox/Checkbox and Loop Through All Records Pin
guodl3-Jan-13 11:11
memberguodl3-Jan-13 11:11 
Questionlive update Pin
Subin Mavunkal3-Jan-13 3:23
memberSubin Mavunkal3-Jan-13 3:23 
AnswerRe: live update Pin
Keith Barrow3-Jan-13 3:46
mentorKeith Barrow3-Jan-13 3:46 
AnswerRe: live update Pin
Rahul Rajat Singh3-Jan-13 23:04
memberRahul Rajat Singh3-Jan-13 23:04 
QuestionHow to populate WoW Slider from database Pin
Jassim Rahma1-Jan-13 9:32
memberJassim Rahma1-Jan-13 9:32 
QuestionUmbarco or Joomla? Pin
Jassim Rahma1-Jan-13 0:58
memberJassim Rahma1-Jan-13 0:58 
AnswerRe: Umbarco or Joomla? Pin
Rahul Rajat Singh3-Jan-13 22:51
memberRahul Rajat Singh3-Jan-13 22:51 
AnswerRe: Umbarco or Joomla? Pin
deflinek8-Jan-13 3:55
memberdeflinek8-Jan-13 3:55 
QuestionSlideShow Control Pin
cdpsource31-Dec-12 2:19
membercdpsource31-Dec-12 2:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.150506.1 | Last Updated 6 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid