function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rakesh KumarRakesh Kumar 

How to implement excel's macro in visualforce ??

Hi all,

 

I want to implement macro and formula in visualforce that can handle the auto deletion of blank rows of excel and auto calculation of cell values. i know macro but i dont know how to implement it.

 

my macro code is ::

 

Public Sub RemoveEmptyRows()
   Dim LastRow As Long, CurrentRow As Long
   Dim EntireRow As Range
   
   LastRow = Cells.Find("*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
   
   For CurrentRow = LastRow To 1 Step -1
      Set EntireRow = Cells(CurrentRow, 1).EntireRow
      If Application.WorksheetFunction.CountA(EntireRow) = 0 Then EntireRow.Delete
   Next CurrentRow

End Sub


 

Is there any idea to implement excel formula or macro during download an excel file to visualforce page?

 

 

Thanks in advance

R.K