Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8900205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:03:08+00:00 2026-06-15T01:03:08+00:00

I am opening an excel and displaying it in grid using Interop.Excel I want

  • 0

I am opening an excel and displaying it in grid using Interop.Excel

I want to show the data in the grid as in excel. I mean same styles should be applied. I am using datatable for reading data from excel and bingding it to grid.

I have tried the following. While reading the cell data, I am reading the style of the cell into Style class and tried to apply in the grid. but while running it was throwing exception cannot convert an object Excel.Style to WebControls.Style. Is there any way to achieve it?

THanks in advance……

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T01:03:09+00:00Added an answer on June 15, 2026 at 1:03 am

    Excel.Style is a COM type, and does not inherit any .NET classes/interfaces for web applications. There is also no explicit conversion to/from WebControls.Style. You will have to write your own method to populate a new style object from an Excel style.

    You will not be able to completely reproduce the style, either; as WebControls.Style only supports a limited subset of the properties in Excel.Style. You will have to go through the properties of the web control style class and, on an individual basis, work out how to best map to the equivalent property in the Excel style.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm opening an excel worksheet using the Microsoft.Office.Interop.Excel COM interface. I'm trying to adjust
With this: using Excel = Microsoft.Office.Interop.Excel; I'm opening the excel and after I'm setting
In my appliation,I am opening an excel sheet to show one of my Excel
Rright now I'm opening excel using System.Diagnostics.Process.Start(fileInfo); to open my package after saving it
I am doing export of data from database to Excel. After exporting when opening
Excel Interop is removing images from processed files. I’m using the Excel Interop, no
Here is my code for opening the Excel file and reading the data, everything
Exporting select query data from mysql to csv & opening with excel, the leading
i am converting silver light grid view into XML. it opening in excel exactly.
I am working on a C# application which opens Excel workbooks using Interop. It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.