You could create a slash command in your addon like this for example:
Lua Code:
SLASH_COMMANDS["/exportcsf"]=function()
MyAddonsSaveData = {}
SHARED_FURNITURE:GetMarketProductCategoryTreeData():GetNumEntriesRecursive(function(entry)
local line = {}
line[#line + 1] = tostring(entry.marketProductId)
line[#line + 1] = entry.formattedName
line[#line + 1] = entry.icon
line[#line + 1] = tostring(entry.quality)
line[#line + 1] = tostring(entry.cost)
line[#line + 1] = tostring(entry.costAfterDiscount)
line[#line + 1] = tostring(entry.discountPercent)
line[#line + 1] = tostring(entry.categoryId)
line[#line + 1] = tostring(entry.subcategoryId)
line[#line + 1] = tostring(entry.isFree)
line[#line + 1] = tostring(entry.isNew)
line[#line + 1] = tostring(entry.onSale)
MyAddonsSaveData[#MyAddonsSaveData + 1] = table.concat(line, ";")
end)
end
It will save each entry in a new line in your saved variables file and you can then just use notepad++ to clean it up and save it as a csv.
You need to open the market tab in the housing editor once before it will produce any data.