Problem with creation an empty table with column names

I have a code:
#reading a file
table <- readxl::read_excel("name.xlsx", sheet = "sheetname", skip = 10, col_names = TRUE)

#creating column names
col_n <- na.omit(AE_table[" Column Name"])

create an empty table

df <- data.frame(matrix(ncol=length(col_n),nrow=0))
colnames(df) <- col_n
print(df)

I obtained one column containing: c("name1", "name2", "name3"......)
Any ideas how to resolve this ??
Thanks a lot for some clues.

Hi @BeWu ,

Am I right to assume that you want an empty copy of your table object?

library(dplyr)
df <- table %>% slice(0)

Let me know if you're looking for something else, but column names and classes will be retained.