Skip to content

Add function that returns populated cells in sheet

Created by: henryx

For a better management (e.g. for clearing data in sheet), is useful to add a function that returns all populated cells. For example, if I have an Excel file that I have inserted data in A1 and B4:

f, _ := excelize.OpenFile("file.xlsx")
cells := f.GetPopulatedCells("Sheet1") // cells can be a []string that contains "A1", "B4"