You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
As you know, Jira exports issues to CSV (all fields) all associated custom fields, even if they are empty. So, when you import this CSV Jira also asks you to fill in mapping a lot of unnecessary custom fields.
There is a short VBA script for Excel to delete all empty columns.
Dim rng As Range
Dim backupHeader As Variant
Dim inputRng As Range
'Select all cells in the worksheet
Set inputRng = Range("A1").CurrentRegion
Application.ScreenUpdating = False
'Go through columns
For i = inputRng.Columns.Count To 1 Step -1
'Remember the current header name
backupHeader = inputRng.Cells(1, i).Value
'Remove the current header, if necessary we return it back later
Set rng = inputRng.Cells(1, i).EntireColumn
If Application.WorksheetFunction.CountA(rng) = 0 Then
'delete column if all cells are empty
'Debug.Print "Delete " + backupHeader
'return header back if column contains data
'Debug.Print "Return " + backupHeader
inputRng.Cells(1, i).Value = backupHeader
Application.ScreenUpdating = True
I hope this will be helpful.
Senior systems engineer
43 accepted answers