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 8668869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:19:13+00:00 2026-06-12T18:19:13+00:00

I am trying to map a image into a excel spread sheet and i

  • 0

I am trying to map a image into a excel spread sheet and i need to find what the coordinates of the current cell are?

My code at the moment loops though each cell till it finds a matching tag in the excel where it knows this is the cell to place the picture.

I have the cell i just have no idea how to obtain the cells top and left properties?

foreach (ExcelRangeBase cell in range1)
     {

     }

Please help!

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-12T18:19:14+00:00Added an answer on June 12, 2026 at 6:19 pm
    int row = cellAddress.Start.Row;
    int column = cellAddress.Start.Column;
    
    
    if (mCellsResult.Count() > 0)
    {
    var mCells = mCellsResult.First();
    
    //if the cell and the merged cell do not share a common start address then skip this cell as it's already been covered by a previous item
    if (mCells.Start.Address != cellAddress.Start.Address)
                                                            continue;
    
    if (mCells.Start.Column != mCells.End.Column)
    {
    colSpan += mCells.End.Column - mCells.Start.Column;
    }
    
    if (mCells.Start.Row != mCells.End.Row)
    {
       rowSpan += mCells.End.Row - mCells.Start.Row;
    }
    }
    double height = 0, width = 0;
    for (int h = 0; h < rowSpan; h++)
    {
    height += xlWorkSeet1[k].Row(row + h).Height;
    }
    for (int w = 0; w < colSpan; w++)
    {
     width += xlWorkSeet1[k].Column(column + w).Width;
    }
    
    double pointToPixel = 0.75;
    
    height /= pointToPixel;
    width /= 0.1423;
    
    
    picture = xlWorkSeet1[k].Drawings.AddPicture(System.Guid.NewGuid().ToString() + row.ToString() + column.ToString(), image);
    picture.From.Column = column - 1;
    picture.From.Row = row - 1;
    picture.SetSize((int)width, (int)height);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to map an image using shape=poly. It works in Chrome, but doesn't
So I'm trying to overlay a map image with a transparent ninepatch Drawable using
I am trying to create a wpf control that will display a map image
I'm trying to update an image overlay on a google map on the fly.
I am trying to map a legacy database here and I'm running into a
I am adding an image into a JLabel and trying to set the width
I'm trying to use jQuery to dynamically create an image map, and I ran
I am trying to put an offline Openstreetmap map into my Java Application. I
I'm trying to develop my own map service then display my generated images into
I'm trying to map an image. so when the map-area is click, it will

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.